mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-11 01:48:40 +00:00
bug fixes
This commit is contained in:
parent
a038d97a36
commit
c8696fe445
|
|
@ -35,13 +35,20 @@ Autoloader.assetLoader = new AssetManager();
|
|||
*/
|
||||
Autoloader.defineNamespace = function (namespace)
|
||||
{
|
||||
if (Autoloader.namespaced.indexOf(namespace) === -1) {
|
||||
if (Autoloader.namespaced.indexOf(namespace) !== -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
const paths = namespace.split('.');
|
||||
paths.splice(0, 1);
|
||||
|
||||
const length = paths.length;
|
||||
let current = window.omsApp;
|
||||
|
||||
if (typeof current === 'undefined') {
|
||||
return;
|
||||
}
|
||||
|
||||
for (let i = 0; i < length; ++i) {
|
||||
if (typeof current[paths[i]] === 'undefined') {
|
||||
current[paths[i]] = {};
|
||||
|
|
@ -51,7 +58,6 @@ Autoloader.defineNamespace = function (namespace)
|
|||
}
|
||||
|
||||
Autoloader.namespaced.push(namespace);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ export class VoiceManager
|
|||
this.recognition = null;
|
||||
this.speechRecognitionList = null;
|
||||
|
||||
if (SpeechRecognition !== null) {
|
||||
if (SpeechRecognition !== null && SpeechGrammarList !== null) {
|
||||
this.recognition = new SpeechRecognition();
|
||||
this.speechRecognitionList = new SpeechGrammarList();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user