Commit a610c43c064de933c91dda475f73cdeaf5835d80

Authored by 陈亮
1 parent 7df3c039

fix bug

Showing 1 changed file with 1 additions and 1 deletions
lib/Instance.js
... ... @@ -494,7 +494,7 @@ function Instance(Model, opts) {
494 494 } else if (prop && 'defaultValue' in prop) {
495 495 defaultValue = prop.defaultValue;
496 496 }
497   - if(opts.only.length==0 || opts.only.indexOf(key) > 0)
  497 + if(opts.only.length==0 || opts.only.indexOf(key) >= 0)
498 498 {
499 499 setInstanceProperty(key, defaultValue);
500 500  
... ...