mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04: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 = {
|
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…
Add table
Add a link
Reference in a new issue