diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2018-10-05 07:11:19 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2018-10-05 07:11:19 +0300 |
commit | b1ff5e6afa94f1079e2afce96b58035a675eeb81 (patch) | |
tree | 3117d3bfb878b8ebcd987ef801135435f7d3e6b3 /plugins/Morpheus | |
parent | 8977a9222114eb5b5e6f0de664820cb165407822 (diff) |
Fix replace not defined JS error (#13545)
* Fix replace not defined JS error
Fixes error https://code.angularjs.org/1.6.5/docs/error/$interpolate/interr?p0=%7B%7B%20%27CoreHome_ClickToEditX%27%7Ctranslate%3A%28featureName%7Cescape%29%20%7D%7D&p1=TypeError%3A%20Cannot%20read%20property%20%27replace%27%20of%20undefined which I get when loading the UI
* tabbing tweak
Diffstat (limited to 'plugins/Morpheus')
-rw-r--r-- | plugins/Morpheus/javascripts/piwikHelper.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/Morpheus/javascripts/piwikHelper.js b/plugins/Morpheus/javascripts/piwikHelper.js index 341622bdb6..cdc44aaa1c 100644 --- a/plugins/Morpheus/javascripts/piwikHelper.js +++ b/plugins/Morpheus/javascripts/piwikHelper.js @@ -96,6 +96,9 @@ var piwikHelper = { htmlEntities: function(value) { + if (!value) { + return value; + } var findReplace = [[/&/g, "&"], [/</g, "<"], [/>/g, ">"], [/"/g, """]]; for(var item in findReplace) { value = value.replace(findReplace[item][0], findReplace[item][1]); |