From 4697f2ecad9dff86fa866037e71cf1660dbbb32a Mon Sep 17 00:00:00 2001 From: Hai Le Date: Sat, 1 Aug 2015 15:54:00 +1000 Subject: [PATCH] Bug fix: Issue with stripping modifiers with no trailing characters after placeholder When using a modifier with no trailing characters after the placeholder eg. setting a color style with #{0}. The end selection is set to 0 resulting in the value also being stripped --- .../views/propertyeditors/grid/dialogs/config.controller.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/config.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/config.controller.js index 731912c951..d60535acd1 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/config.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/config.controller.js @@ -22,7 +22,10 @@ angular.module("umbraco") } else { return val.slice(paddArray[0].length, 0); } - }else{ + } else { + if (paddArray[1].length === 0) { + return val.slice(paddArray[0].length); + } return val.slice(paddArray[0].length, -paddArray[1].length); } }