From c43929f1c663c3bdaaca89940ca9abf01894f2a4 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 10 Feb 2016 12:07:45 -0800 Subject: [PATCH] [Create] Add specificity to check Explicitly check if an object has a persistence timestamp at all (avoids false-positives due to falsiness of zero.) --- platform/commonUI/edit/bundle.js | 4 ---- platform/commonUI/edit/src/actions/SaveAction.js | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/platform/commonUI/edit/bundle.js b/platform/commonUI/edit/bundle.js index 726a14bc07..f5142031e6 100644 --- a/platform/commonUI/edit/bundle.js +++ b/platform/commonUI/edit/bundle.js @@ -156,11 +156,7 @@ define([ "name": "Save", "description": "Save changes made to these objects.", "depends": [ - "$q", - "$location", "$injector", - "urlService", - "navigationService", "policyService", "dialogService", "creationService", diff --git a/platform/commonUI/edit/src/actions/SaveAction.js b/platform/commonUI/edit/src/actions/SaveAction.js index 56923d1d51..3fb376e6fb 100644 --- a/platform/commonUI/edit/src/actions/SaveAction.js +++ b/platform/commonUI/edit/src/actions/SaveAction.js @@ -118,7 +118,7 @@ define( function doSave() { //This is a new 'virtual object' that has not been persisted // yet. - if (!domainObject.getModel().persisted){ + if (domainObject.getModel().persisted === undefined){ return getParent(domainObject) .then(doWizardSave) .then(getParent)