From 600ae926d43089aa6de499656a41e504d58a9025 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Sun, 13 Sep 2020 22:21:30 +0200 Subject: [PATCH] Remove local function to create guid and use String.CreateGuid() extension function instead (#8886) --- .../propertyeditors/grid/grid.controller.js | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js index 6d3383c51e..50146a4c36 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js @@ -627,21 +627,8 @@ angular.module("umbraco") } - - var guid = (function () { - function s4() { - return Math.floor((1 + Math.random()) * 0x10000) - .toString(16) - .substring(1); - } - return function () { - return s4() + s4() + "-" + s4() + "-" + s4() + "-" + - s4() + "-" + s4() + s4() + s4(); - }; - })(); - - $scope.setUniqueId = function (cell, index) { - return guid(); + $scope.setUniqueId = function () { + return String.CreateGuid(); }; $scope.addControl = function (editor, cell, index, initialize) {