Browse Source

fuck the boilerplate bug

Ivan Asmer 5 năm trước cách đây
mục cha
commit
c773061c07
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      models.js

+ 1 - 1
models.js

@@ -25,7 +25,7 @@ module.exports = async (dbName='shop') => {
         class Good extends SlicedSavable {
             constructor(...params){
                 super(...params)
-                this.categories = this.category instanceof Array ? this.category : (this.category ? [this.category] : []) 
+                this.categories = this.categories instanceof Array ? this.categories : (this.categories ? [this.categories] : []) 
                 this.orderGoods = this.orderGoods instanceof Array ? this.orderGoods : (this.orderGoods ? [this.orderGoods] : []) 
             }