diff --git a/lib/db.coffee b/lib/db.coffee index 6dc69d6..75b3386 100644 --- a/lib/db.coffee +++ b/lib/db.coffee @@ -683,7 +683,7 @@ syncFaults = (deviceId, faults, callback) -> ) for channel, fault of faults - continue if fault.retries == existingFaults[channel]?.retries + continue if existingFaults[channel]? and fault.retries == existingFaults[channel].retries do (channel, fault) -> ++ counter fault._id = "#{deviceId}:#{channel}"