Skip to content

Commit

Permalink
Fixed console.warning is not a function.
Browse files Browse the repository at this point in the history
```
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)
```
  • Loading branch information
kelp404 committed Sep 26, 2018
1 parent 554f76f commit 8fdd997
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
property = referenceProperties[l];
resolveDocument = dataTable[property.referenceClass.name][document[property.propertyName]];
if (property.required && !resolveDocument) {
console.warning(`There are a reference class can't mapping: ${property.referenceClass.name}::${document[property.propertyName]}`);
console.log(`There are a reference class can't mapping: ${property.referenceClass.name}::${document[property.propertyName]}`);
continue;
}
document[property.propertyName] = resolveDocument;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/query.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ module.exports = class Query
for property in referenceProperties # loop all reference properties in the document
resolveDocument = dataTable[property.referenceClass.name][document[property.propertyName]]
if property.required and not resolveDocument
console.warning("There are a reference class can't mapping: #{property.referenceClass.name}::#{document[property.propertyName]}")
console.log "There are a reference class can't mapping: #{property.referenceClass.name}::#{document[property.propertyName]}"
continue
document[property.propertyName] = resolveDocument
resolve()
Expand Down

0 comments on commit 8fdd997

Please sign in to comment.