From 5061c2e0844d5c07dd35fb8d9bd6042125f41cda Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Tue, 26 May 2015 11:14:31 -0600 Subject: [PATCH] removed unused deferred reference --- lib/edit/editsStore.js | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/lib/edit/editsStore.js b/lib/edit/editsStore.js index 74ebb32..a20936f 100644 --- a/lib/edit/editsStore.js +++ b/lib/edit/editsStore.js @@ -585,30 +585,27 @@ O.esri.Edit.EditStore = function () { console.assert(this._db !== null, "indexeddb not initialized"); var objectStore = this._db.transaction([this.objectStoreName], "readwrite").objectStore(this.objectStoreName); - require(["dojo/Deferred"], function (Deferred) { + if(typeof id === "undefined"){ + callback(false,"id is undefined."); + return; + } - if(typeof id === "undefined"){ - callback(false,"id is undefined."); - return; + //Get the entry associated with the graphic + var objectStoreGraphicRequest = objectStore.get(id); + + objectStoreGraphicRequest.onsuccess = function () { + var graphic = objectStoreGraphicRequest.result; + if (graphic && (graphic.id == id)) { + callback(true,graphic); } + else { + callback(false,"Id not found"); + } + }; - //Get the entry associated with the graphic - var objectStoreGraphicRequest = objectStore.get(id); - - objectStoreGraphicRequest.onsuccess = function () { - var graphic = objectStoreGraphicRequest.result; - if (graphic && (graphic.id == id)) { - callback(true,graphic); - } - else { - callback(false,"Id not found"); - } - }; - - objectStoreGraphicRequest.onerror = function (msg) { - callback(false,msg); - }; - }); + objectStoreGraphicRequest.onerror = function (msg) { + callback(false,msg); + }; }; /**