Skip to content

Commit 8fdd997

Browse files
committed
Fixed console.warning is not a function.
``` TypeError: console.warning is not a function at /opt/ping-api/node_modules/enju/lib/query.js:165:25 at <anonymous>:null:null at process._tickDomainCallback (internal/process/next_tick.js:228:7) ```
1 parent 554f76f commit 8fdd997

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/query.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
property = referenceProperties[l];
163163
resolveDocument = dataTable[property.referenceClass.name][document[property.propertyName]];
164164
if (property.required && !resolveDocument) {
165-
console.warning(`There are a reference class can't mapping: ${property.referenceClass.name}::${document[property.propertyName]}`);
165+
console.log(`There are a reference class can't mapping: ${property.referenceClass.name}::${document[property.propertyName]}`);
166166
continue;
167167
}
168168
document[property.propertyName] = resolveDocument;

src/lib/query.coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ module.exports = class Query
108108
for property in referenceProperties # loop all reference properties in the document
109109
resolveDocument = dataTable[property.referenceClass.name][document[property.propertyName]]
110110
if property.required and not resolveDocument
111-
console.warning("There are a reference class can't mapping: #{property.referenceClass.name}::#{document[property.propertyName]}")
111+
console.log "There are a reference class can't mapping: #{property.referenceClass.name}::#{document[property.propertyName]}"
112112
continue
113113
document[property.propertyName] = resolveDocument
114114
resolve()

0 commit comments

Comments
 (0)