Update index.js

allows add() to continue with the db op even if there is nothing to be added to the batch.