Skip to content

Commit d6bc072

Browse files
committed
package-lock update and make this check work even if MESSAGES is not defined
1 parent 552963c commit d6bc072

File tree

2 files changed

+1
-95
lines changed

2 files changed

+1
-95
lines changed

package-lock.json

Lines changed: 0 additions & 94 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/scripts/npm-dependencies.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function rpcForwardCallback(module, name) {
5959
return async function(...args) {
6060
const realargs = args.slice(0, args.length - 1);
6161
const callback = args[args.length - 1];
62-
if(!window.MESSAGES.sendRpc) { throw new Error("Cannot " + name + " on the web"); }
62+
if(!(window.MESSAGES && window.MESSAGES.sendRpc)) { throw new Error("Cannot " + name + " on the web"); }
6363
else {
6464
try {
6565
const result = await window.MESSAGES.sendRpc(module, name, realargs);

0 commit comments

Comments
 (0)