diff --git a/web/source/kmwbase.ts b/web/source/kmwbase.ts index 31fcad6d37..2831691348 100644 --- a/web/source/kmwbase.ts +++ b/web/source/kmwbase.ts @@ -323,7 +323,7 @@ namespace com.keyman { */ async ['addKeyboards'](...args: any[]) : Promise<(com.keyman.keyboards.KeyboardStub|com.keyman.keyboards.ErrorStub)[]> { - if (args[0].length == 0) { + if (!args || !args[0] || args[0].length == 0) { // Get the cloud keyboard catalog let stubs: (com.keyman.keyboards.KeyboardStub|com.keyman.keyboards.ErrorStub)[] = []; try {