dresende/node-orm2

Double calling callback in db.load

antishov opened this issue · 2 comments

const argumentsList = modelsNamesList.map(modelName => `${__dirname}/models/${modelName}`);
argumentsList.push(callback);
db.load(...argumentsList);

In this example callback for the last item in array will be called two times: when model was loaded and when "files" variable will be empty. Error in file ORM.js, line 278

dxg commented

Can you please provide a fully functioning sample?
Along the lines of #326 (comment)

I can't reproduce error now, sorry