mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-04 22:27:10 -04:00
Fixed get undefined.
This commit is contained in:
parent
85dc9c088f
commit
1ccd27e2d3
1 changed files with 7 additions and 1 deletions
|
@ -24,7 +24,13 @@ const loadFn = (path, hookName, modules) => {
|
|||
functionName = parts[1];
|
||||
}
|
||||
|
||||
let fn = modules ? modules.get(path) : require(/* webpackIgnore: true */ path);
|
||||
let fn
|
||||
if (modules === undefined || !("get" in modules)) {
|
||||
fn = require(/* webpackIgnore: true */ path);
|
||||
} else {
|
||||
fn = modules.get(path);
|
||||
}
|
||||
|
||||
functionName = functionName ? functionName : hookName;
|
||||
|
||||
for (const name of functionName.split('.')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue