mm_machine 3.4.4 → 3.4.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.
Files changed (2) hide show
  1. package/lib/drive.js +7 -4
  2. package/package.json +1 -1
package/lib/drive.js CHANGED
@@ -181,11 +181,14 @@ Drive.prototype._initOptions = function () {
181
181
 
182
182
  this._options = {};
183
183
  // 根据config.options生成键值对,缓存值优先,否则取默认值
184
- for (let key in options) {
185
- if (cached.hasOwnProperty(key) && cached[key] !== undefined) {
186
- this._options[key] = cached[key];
184
+ for (let i = 0; i < options.length; i++) {
185
+ let option = options[i];
186
+ let key = option.key;
187
+ let value = cached[key];
188
+ if (cached.hasOwnProperty(key) && value !== undefined) {
189
+ this._options[key] = value;
187
190
  } else {
188
- this._options[key] = options[key].default;
191
+ this._options[key] = option.default;
189
192
  }
190
193
  }
191
194
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_machine",
3
- "version": "3.4.4",
3
+ "version": "3.4.6",
4
4
  "description": "A flexible Node.js plugin mechanism system for dynamic loading, management and execution of modules. Supports hot reload, lifecycle management, and modern JavaScript features.",
5
5
  "main": "index.js",
6
6
  "scripts": {