Default plugin should not fail if clientVars is not defined.
In the case that it is not defined, the configuration is `undefined`.
This commit is contained in:
parent
0f7e6feda1
commit
6bbc32a19f
|
@ -7,7 +7,8 @@
|
||||||
plugins = {
|
plugins = {
|
||||||
callHook: function(hookName, args)
|
callHook: function(hookName, args)
|
||||||
{
|
{
|
||||||
var hook = clientVars.hooks[hookName];
|
var global = (function () {return this}());
|
||||||
|
var hook = ((global.clientVars || {}).hooks || {})[hookName];
|
||||||
if (hook === undefined) return [];
|
if (hook === undefined) return [];
|
||||||
var res = [];
|
var res = [];
|
||||||
for (var i = 0, N = hook.length; i < N; i++)
|
for (var i = 0, N = hook.length; i < N; i++)
|
||||||
|
|
Loading…
Reference in New Issue