q-koa 10.6.4 → 10.6.5

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.
@@ -248,6 +248,11 @@ exports.initData = async ({ includes, excludes, app, ctx }) => {
248
248
  [item]: app.cache.get(`${model}`),
249
249
  })
250
250
  }
251
+ if (!app.model[model] || !app.model[model][fn]) {
252
+ return Promise.resolve({
253
+ [item]: [],
254
+ })
255
+ }
251
256
  return app.model[model][fn]({
252
257
  include: app.include[model],
253
258
  ...(app.config[model] ? app.config[model].autoData : {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "10.6.4",
3
+ "version": "10.6.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {