mm_machine 1.9.9 → 2.0.1

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/item.js +7 -7
  2. package/package.json +1 -1
package/item.js CHANGED
@@ -97,7 +97,7 @@ class Item {
97
97
  * @param {Object} config 配置
98
98
  */
99
99
  Item.prototype.set_config = function(config) {
100
- if (config.func_file !== this.config.func_file) {
100
+ if (config && config.func_file !== this.config.func_file) {
101
101
  this.complete = false;
102
102
  }
103
103
  this.config = conf(Object.assign({}, this.config, config || {}), this.filename);
@@ -352,16 +352,16 @@ Item.prototype.remove_file = function() {
352
352
 
353
353
  /**
354
354
  * 载入配置
355
- * @param {Object|String} cg 配置对象或配置路径
355
+ * @param {Object|String} conf 配置对象或配置路径
356
356
  * @param {String} name 配置名称
357
357
  */
358
- Item.prototype.load_config = function(cg, name) {
358
+ Item.prototype.load_config = function(conf, name) {
359
359
  var config;
360
- if (cg) {
361
- if (typeof(cg) === "string") {
362
- config = this.load_file(cg, name);
360
+ if (conf) {
361
+ if (typeof(conf) === "string") {
362
+ config = this.load_file(conf, name);
363
363
  } else {
364
- config = cg;
364
+ config = conf;
365
365
  }
366
366
  } else {
367
367
  config = this.load_file(this.filename, name);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_machine",
3
- "version": "1.9.9",
3
+ "version": "2.0.1",
4
4
  "description": "这是超级美眉框架机制构建辅助模块,用于快速构建一个机制",
5
5
  "main": "index.js",
6
6
  "scripts": {