From 6ccf8c3b29c9078a5fcd3eaf8c31aeb4757b803f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rog=C3=A9rio=20Chaves?= Date: Sun, 26 Apr 2015 10:36:59 -0300 Subject: [PATCH] Fix debugLog for actions executed on collection Because collection has no id, the log was showing `undefined` when making a fetch for the collection, it's better to show that it is a collection --- backbone-indexeddb.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backbone-indexeddb.js b/backbone-indexeddb.js index 5cf5f9a..a97b37f 100644 --- a/backbone-indexeddb.js +++ b/backbone-indexeddb.js @@ -192,7 +192,7 @@ // This is the main method, called by the ExecutionQueue when the driver is ready (database open and migration performed) execute: function (storeName, method, object, options) { - if (!this.nolog) debugLog("execute : " + method + " on " + storeName + " for " + object.id); + if (!this.nolog) debugLog("execute : " + method + " on " + storeName + " for " + (object.id || object.cid || "collection")); switch (method) { case "create": this.create(storeName, object, options);