q-koa 13.2.6 → 13.2.7

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 CHANGED
@@ -2188,7 +2188,7 @@ APP.getConfig = (app) => ({
2188
2188
  } else {
2189
2189
  app.cache.set(target, null)
2190
2190
 
2191
- if (app.appConfig.appName) {
2191
+ if (app.appConfig.appName && app.appConfig.productionHost) {
2192
2192
  const ipHost = (
2193
2193
  Array.isArray(app.appConfig.productionHost)
2194
2194
  ? app.appConfig.productionHost
@@ -114,7 +114,7 @@ exports.loadModel = async ({ app, appName }) => {
114
114
  list: attributes.map((attr, index) => {
115
115
  const name = attr.match(/exports.(.*)=/)[1].trim()
116
116
  let defaultValue = ''
117
- if (model[name] && model[name].hasOwnProperty('defaultValue')) {
117
+ if (model[name] && 'defaultValue' in model[name]) {
118
118
  if (
119
119
  typeof model[name].defaultValue === 'boolean' &&
120
120
  model[name].defaultValue === true
@@ -154,7 +154,7 @@ exports.loadModel = async ({ app, appName }) => {
154
154
  if (
155
155
  !model[name].defaultValue &&
156
156
  typeof model[name].defaultValue !== 'undefined' &&
157
- model[name].defaultValue != 0
157
+ model[name].defaultValue !== 0
158
158
  ) {
159
159
  defaultValue = 'null'
160
160
  }
@@ -165,10 +165,7 @@ exports.loadModel = async ({ app, appName }) => {
165
165
  ) {
166
166
  defaultValue = 'null'
167
167
  }
168
- } else if (
169
- model[name] &&
170
- !model[name].hasOwnProperty('defaultValue')
171
- ) {
168
+ } else if (model[name] && !('defaultValue' in model[name])) {
172
169
  defaultValue = "''"
173
170
  }
174
171
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "13.2.6",
3
+ "version": "13.2.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {