From 1b83e0a87da3a5c5287d4253700fd2de9ac8e2bf Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 26 Jun 2019 13:49:45 +1000 Subject: [PATCH] cleanup --- .../src/common/resources/entity.resource.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/entity.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/entity.resource.js index dce2cd8347..455fcab956 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/entity.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/entity.resource.js @@ -327,24 +327,13 @@ function entityResource($q, $http, umbRequestHelper) { * */ getAncestors: function (id, type, options) { - var defaults = { - dataTypeId: null - }; - if (options === undefined) { - options = {}; - } - //overwrite the defaults if there are any specified - angular.extend(defaults, options); - //now copy back to the options we will use - options = defaults; - - + var args = [ { id: id }, { type: type } ]; - if(options.dataTypeId){ - args.push({dataTypeId: options.dataTypeId}); + if (options.dataTypeId) { + args.push({ dataTypeId: options.dataTypeId }); } return umbRequestHelper.resourcePromise(