Skip to content

Commit

Permalink
fix Candlestick model condition
Browse files Browse the repository at this point in the history
  • Loading branch information
egisz committed Jun 3, 2020
1 parent 330c5ee commit 42d6eaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/repository/candlestick_repository.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ module.exports = function(sequelize, DataTypes) {
...(typeof(start) !== 'undefined') && {[Op.gt]: start},
...(typeof(end) !== 'undefined') && {[Op.lt]: end}
};
if (Object.keys(timeConditions).length !== 0) {
if (Reflect.ownKeys(timeConditions).length > 0) {
whereCondition.time = timeConditions;
};
return CandlestickRepository.findAll({
Expand Down

0 comments on commit 42d6eaf

Please sign in to comment.