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
4c2f4d2384
commit
b8291ef316
1 changed files with 7 additions and 1 deletions
|
@ -24,7 +24,13 @@ const loadFn = (path, hookName, modules) => {
|
||||||
functionName = parts[1];
|
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;
|
functionName = functionName ? functionName : hookName;
|
||||||
|
|
||||||
for (const name of functionName.split('.')) {
|
for (const name of functionName.split('.')) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue