mm_machine 1.9.5 → 1.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/demo/test1/index.js +1 -1
- package/item.js +6 -2
- package/package.json +1 -1
package/demo/test1/index.js
CHANGED
package/item.js
CHANGED
|
@@ -197,7 +197,9 @@ Item.prototype.load_script = function(file, name = "") {
|
|
|
197
197
|
cs = $.require(file, (cs, way) => {
|
|
198
198
|
if (way == "change" && cs) {
|
|
199
199
|
if (name) {
|
|
200
|
-
|
|
200
|
+
if (cs[name]) {
|
|
201
|
+
this.main = cs[name];
|
|
202
|
+
}
|
|
201
203
|
} else {
|
|
202
204
|
$.push(this, cs, true);
|
|
203
205
|
}
|
|
@@ -208,7 +210,9 @@ Item.prototype.load_script = function(file, name = "") {
|
|
|
208
210
|
}
|
|
209
211
|
if (cs) {
|
|
210
212
|
if (name) {
|
|
211
|
-
|
|
213
|
+
if (cs[name]) {
|
|
214
|
+
this.main = cs[name];
|
|
215
|
+
}
|
|
212
216
|
} else {
|
|
213
217
|
$.push(this, cs, true);
|
|
214
218
|
}
|