Merge branch 'release/1.2.11' into production
This commit is contained in:
commit
76f719c3e8
|
@ -102,8 +102,8 @@ var modelHelper = module.exports = {
|
||||||
generateModelDefinition(rel.modelThrough, out);
|
generateModelDefinition(rel.modelThrough, out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(var rm in referencedModels) {
|
for (var i = 0, n = referencedModels.length; i < n; i++) {
|
||||||
generateModelDefinition(referencedModels[rm], out);
|
generateModelDefinition(referencedModels[i], out);
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "loopback-explorer",
|
"name": "loopback-explorer",
|
||||||
"version": "1.2.10",
|
"version": "1.2.11",
|
||||||
"description": "Browse and test your LoopBack app's APIs",
|
"description": "Browse and test your LoopBack app's APIs",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -164,6 +164,18 @@ describe('model-helper', function() {
|
||||||
expect(defs).has.property('Model5');
|
expect(defs).has.property('Model5');
|
||||||
expect(defs).has.property('Model6');
|
expect(defs).has.property('Model6');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// https://github.com/strongloop/loopback-explorer/issues/49
|
||||||
|
it('should work if Array class is extended and no related models are found',
|
||||||
|
function() {
|
||||||
|
var Model7 = loopback.createModel('Model7', {street: String});
|
||||||
|
Array.prototype.customFunc = function() {
|
||||||
|
};
|
||||||
|
var defs = modelHelper.generateModelDefinition(Model7, {});
|
||||||
|
expect(defs).has.property('Model7');
|
||||||
|
expect(Object.keys(defs)).has.property('length', 1);
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('hidden properties', function() {
|
describe('hidden properties', function() {
|
||||||
|
|
Loading…
Reference in New Issue