@mixd-id/web-scaffold 0.1.230406317 → 0.1.230406318

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mixd-id/web-scaffold",
3
3
  "private": false,
4
- "version": "0.1.230406317",
4
+ "version": "0.1.230406318",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -362,8 +362,14 @@ const filtersToSequelizeWhere = async(filters, opt) => {
362
362
  const type = ((keyColumns[key] ?? [])[0] ?? {}).type
363
363
 
364
364
  let whereObj = {}
365
- const modelAttributes = opt.model.getAttributes()
366
- const {Model, field} = modelAttributes[key]
365
+ let Model, field
366
+ if(opt.model){
367
+ const modelAttributes = opt.model.getAttributes()
368
+ if(modelAttributes[key]){
369
+ Model = opt.model
370
+ field = modelAttributes[key].field
371
+ }
372
+ }
367
373
 
368
374
  switch(type){
369
375