aboutsummaryrefslogtreecommitdiffstats
path: root/include/plugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/plugin.php')
-rw-r--r--include/plugin.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/plugin.php b/include/plugin.php
index 269903373..5b041f228 100644
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -929,8 +929,9 @@ function script_path() {
}
function head_add_js($src, $priority = 0) {
- if(! is_array(App::$js_sources[$priority]))
- App::$js_sources[$priority] = array();
+ if(isset(App::$js_sources[$priority]) && !is_array(App::$js_sources[$priority]))
+ App::$js_sources[$priority] = [];
+
App::$js_sources[$priority][] = $src;
}