q-koa 9.9.9 → 10.0.1
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/core/app.js +9 -2
- package/package.json +1 -1
package/core/app.js
CHANGED
|
@@ -978,6 +978,7 @@ class APP {
|
|
|
978
978
|
}
|
|
979
979
|
const _str = formatPostFunction(include)
|
|
980
980
|
const postInclude = nodeVm.runInNewContext(_str)
|
|
981
|
+
const strInclude = postInclude(app[appName])
|
|
981
982
|
// const postInclude = include.toFunction();
|
|
982
983
|
myInclude =
|
|
983
984
|
app[appName] &&
|
|
@@ -985,8 +986,14 @@ class APP {
|
|
|
985
986
|
app[appName].include[controller]
|
|
986
987
|
? _.uniqWith(
|
|
987
988
|
[
|
|
988
|
-
...
|
|
989
|
-
...app[appName].include[controller]
|
|
989
|
+
...strInclude,
|
|
990
|
+
...app[appName].include[controller].filter((item) => {
|
|
991
|
+
return !strInclude.some(
|
|
992
|
+
(i) =>
|
|
993
|
+
(i.model && i.model.getName()) ===
|
|
994
|
+
(item.model && item.model.getName())
|
|
995
|
+
)
|
|
996
|
+
}),
|
|
990
997
|
],
|
|
991
998
|
_.isEqual
|
|
992
999
|
)
|