From 7364e233b6e2c720fabbe1ae4544c11f7cbb87e7 Mon Sep 17 00:00:00 2001 From: Romain Lanz Date: Wed, 3 Jun 2015 15:26:22 +0200 Subject: [PATCH] Return nothing if popup is not the desired purposed --- src/popup/popup.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/popup/popup.js b/src/popup/popup.js index a952487..84cd589 100644 --- a/src/popup/popup.js +++ b/src/popup/popup.js @@ -13,6 +13,10 @@ angular.module('angularify.semantic.popup', []) // convert to json var popup_meta_data = eval('(' + scope.popup + ')'); + if (popup_meta_data === undefined) { + return; + } + var title = popup_meta_data['title']; if (title == undefined) title = ''; @@ -118,4 +122,4 @@ angular.module('angularify.semantic.popup', []) }); } } -}); \ No newline at end of file +});