소스 검색

fuck the boilerplate bug

Ivan Asmer 5 년 전
부모
커밋
c773061c07
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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] : []) 
             }