Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Morpheus/javascripts/piwikHelper.js')
-rw-r--r--plugins/Morpheus/javascripts/piwikHelper.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/Morpheus/javascripts/piwikHelper.js b/plugins/Morpheus/javascripts/piwikHelper.js
index 163ea90160..cc6ae5dde5 100644
--- a/plugins/Morpheus/javascripts/piwikHelper.js
+++ b/plugins/Morpheus/javascripts/piwikHelper.js
@@ -125,6 +125,10 @@ var piwikHelper = {
compileAngularComponents: function (selector) {
var $element = $(selector);
+ if (!$element || !$element.length) {
+ return;
+ }
+
angular.element(document).injector().invoke(function($compile) {
var scope = angular.element($element).scope();
$compile($element)(scope);
@@ -155,9 +159,9 @@ var piwikHelper = {
var button = {text: text};
if(typeof handles[role] == 'function') {
- button.click = function(){$(this).dialog("close"); handles[role].apply()};
+ button.click = function(){ $(this).dialog("close"); handles[role].apply()};
} else {
- button.click = function(){$(this).dialog("close");};
+ button.click = function(){ $(this).dialog("close");};
}
if (title) {