瀏覽代碼

Update index.js (#1039)

Lutz Roeder 3 年之前
父節點
當前提交
42f7ea1331
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      source/index.js

+ 1 - 1
source/index.js

@@ -27,7 +27,7 @@ host.BrowserHost = class {
             'platform': /(Mac|iPhone|iPod|iPad)/i.test(this._navigator.platform) ? 'darwin' : undefined,
             'menu': true
         };
-        if (/^\d\.\d\.\d$/.test(this.version)) {
+        if (!/^\d\.\d\.\d$/.test(this.version)) {
             throw new Error('Invalid version.');
         }
         this.window.require = (id) => {