Skip to content
This repository has been archived by the owner on Jul 26, 2020. It is now read-only.

Commit

Permalink
fix loopback crash after type change
Browse files Browse the repository at this point in the history
It's not a good idea to mess with the default type property so i defined another one stringType and passed to the Meta model
  • Loading branch information
portokallidis committed Aug 31, 2015
1 parent 18ada2e commit fca38a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/models/meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ module.exports = function (Meta) {
for(var key in model.definition.properties) {
var type=model.definition.properties[key].type.toString().toLowerCase().substr('function '.length);
type=type.substr(0, type.indexOf('('));
model.definition.properties[key].type=type;
}
model.definition.properties[key].stringType=type;
}

result[modelName] = model.definition.properties;
});
Expand Down

0 comments on commit fca38a8

Please sign in to comment.