mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
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
1 changed files with 2 additions and 1 deletions
|
@ -7,7 +7,8 @@
|
|||
plugins = {
|
||||
callHook: function(hookName, args)
|
||||
{
|
||||
var hook = clientVars.hooks[hookName];
|
||||
var global = (function () {return this}());
|
||||
var hook = ((global.clientVars || {}).hooks || {})[hookName];
|
||||
if (hook === undefined) return [];
|
||||
var res = [];
|
||||
for (var i = 0, N = hook.length; i < N; i++)
|
||||
|
|
Loading…
Reference in a new issue