Skip to content

Commit dd5f21d

Browse files
committed
Build dist files with hasModule fix
1 parent 93967bc commit dd5f21d

File tree

7 files changed

+24
-8
lines changed

7 files changed

+24
-8
lines changed

dist/logger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
(function (global, factory) {
77
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
88
typeof define === 'function' && define.amd ? define(factory) :
9-
(global = global || self, global.Vuex = factory());
9+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Vuex = factory());
1010
}(this, (function () { 'use strict';
1111

1212
/**

dist/vuex.common.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,11 @@ ModuleCollection.prototype.isRegistered = function isRegistered (path) {
288288
var parent = this.get(path.slice(0, -1));
289289
var key = path[path.length - 1];
290290

291-
return parent.hasChild(key)
291+
if (parent) {
292+
return parent.hasChild(key)
293+
}
294+
295+
return false
292296
};
293297

294298
function update (path, targetModule, newModule) {

dist/vuex.esm.browser.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,11 @@ class ModuleCollection {
278278
const parent = this.get(path.slice(0, -1));
279279
const key = path[path.length - 1];
280280

281-
return parent.hasChild(key)
281+
if (parent) {
282+
return parent.hasChild(key)
283+
}
284+
285+
return false
282286
}
283287
}
284288

dist/vuex.esm.browser.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vuex.esm.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,11 @@ ModuleCollection.prototype.isRegistered = function isRegistered (path) {
286286
var parent = this.get(path.slice(0, -1));
287287
var key = path[path.length - 1];
288288

289-
return parent.hasChild(key)
289+
if (parent) {
290+
return parent.hasChild(key)
291+
}
292+
293+
return false
290294
};
291295

292296
function update (path, targetModule, newModule) {

dist/vuex.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
(function (global, factory) {
77
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
88
typeof define === 'function' && define.amd ? define(factory) :
9-
(global = global || self, global.Vuex = factory());
9+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Vuex = factory());
1010
}(this, (function () { 'use strict';
1111

1212
function applyMixin (Vue) {
@@ -292,7 +292,11 @@
292292
var parent = this.get(path.slice(0, -1));
293293
var key = path[path.length - 1];
294294

295-
return parent.hasChild(key)
295+
if (parent) {
296+
return parent.hasChild(key)
297+
}
298+
299+
return false
296300
};
297301

298302
function update (path, targetModule, newModule) {

dist/vuex.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)