Fix Inject Module Function (#3795)
* fix inject module function * Update src/util/Injected/Store.js Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com> --------- Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
This commit is contained in:
parent
93559bbe19
commit
ae7bbe7f37
1 changed files with 2 additions and 0 deletions
|
|
@ -213,6 +213,8 @@ exports.ExposeStore = () => {
|
|||
window.injectToFunction = (target, callback) => {
|
||||
let module = window.require(target.module);
|
||||
|
||||
if (!module) return;
|
||||
|
||||
const path = target.function.split('.');
|
||||
const funcName = path.pop();
|
||||
for (const key of path) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue