mm_machine 1.9.4 → 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 +8 -2
- package/package.json +1 -1
package/demo/test1/index.js
CHANGED
package/item.js
CHANGED
|
@@ -185,6 +185,8 @@ Item.prototype.load_script = function(file, name = "") {
|
|
|
185
185
|
if (!file.hasFile()) {
|
|
186
186
|
this.new_script(file);
|
|
187
187
|
}
|
|
188
|
+
} else {
|
|
189
|
+
return;
|
|
188
190
|
}
|
|
189
191
|
}
|
|
190
192
|
if (!name) {
|
|
@@ -195,7 +197,9 @@ Item.prototype.load_script = function(file, name = "") {
|
|
|
195
197
|
cs = $.require(file, (cs, way) => {
|
|
196
198
|
if (way == "change" && cs) {
|
|
197
199
|
if (name) {
|
|
198
|
-
|
|
200
|
+
if (cs[name]) {
|
|
201
|
+
this.main = cs[name];
|
|
202
|
+
}
|
|
199
203
|
} else {
|
|
200
204
|
$.push(this, cs, true);
|
|
201
205
|
}
|
|
@@ -206,7 +210,9 @@ Item.prototype.load_script = function(file, name = "") {
|
|
|
206
210
|
}
|
|
207
211
|
if (cs) {
|
|
208
212
|
if (name) {
|
|
209
|
-
|
|
213
|
+
if (cs[name]) {
|
|
214
|
+
this.main = cs[name];
|
|
215
|
+
}
|
|
210
216
|
} else {
|
|
211
217
|
$.push(this, cs, true);
|
|
212
218
|
}
|