mirror of
https://github.com/Picovoice/porcupine.git
synced 2022-01-28 03:27:53 +03:00
fixed access-key null issue in web binding
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "$",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"description": "Porcupine library for web browsers (via WebAssembly)",
|
||||
"author": "Picovoice Inc",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -123,6 +123,9 @@ export function getRuntimeEnvironment(): string {
|
||||
*/
|
||||
|
||||
export function isAccessKeyValid(accessKey: string): boolean {
|
||||
if (typeof accessKey !== 'string' || accessKey === undefined || accessKey === null) {
|
||||
return false;
|
||||
}
|
||||
const accessKeyCleaned = accessKey.trim();
|
||||
if (accessKeyCleaned === '') { return false; }
|
||||
try {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"@angular/platform-browser-dynamic": "~11.0.5",
|
||||
"@angular/router": "~11.0.5",
|
||||
"@picovoice/porcupine-web-angular": "^2.0.0",
|
||||
"@picovoice/porcupine-web-en-worker": "^2.0.0",
|
||||
"@picovoice/porcupine-web-en-worker": "^2.0.1",
|
||||
"@picovoice/web-voice-processor": "^2.1.2",
|
||||
"rxjs": "~6.6.0",
|
||||
"tslib": "^2.0.0",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"private": true,
|
||||
"description": "Porcupine React demo (made with Create React App)",
|
||||
"dependencies": {
|
||||
"@picovoice/porcupine-web-en-worker": "^2.0.0",
|
||||
"@picovoice/porcupine-web-en-worker": "^2.0.1",
|
||||
"@picovoice/porcupine-web-react": "^2.0.0",
|
||||
"@picovoice/web-voice-processor": "^2.1.2",
|
||||
"@testing-library/jest-dom": "^5.11.4",
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@picovoice/porcupine-web-en-worker": "^2.0.0",
|
||||
"@picovoice/porcupine-web-en-worker": "^2.0.1",
|
||||
"@picovoice/porcupine-web-vue": "^2.0.0",
|
||||
"@picovoice/web-voice-processor": "^2.1.2",
|
||||
"core-js": "^3.6.5",
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
"author": "Picovoice Inc",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@picovoice/porcupine-web-de-worker": "^2.0.0",
|
||||
"@picovoice/porcupine-web-en-worker": "^2.0.0",
|
||||
"@picovoice/porcupine-web-es-worker": "^2.0.0",
|
||||
"@picovoice/porcupine-web-fr-worker": "^2.0.0",
|
||||
"@picovoice/porcupine-web-de-worker": "^2.0.1",
|
||||
"@picovoice/porcupine-web-en-worker": "^2.0.1",
|
||||
"@picovoice/porcupine-web-es-worker": "^2.0.1",
|
||||
"@picovoice/porcupine-web-fr-worker": "^2.0.1",
|
||||
"@picovoice/web-voice-processor": "^2.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Reference in New Issue
Block a user