Skip to content

Commit 41eea76

Browse files
committed
fix: update customComponent file handling to support string type
1 parent b9a4d32 commit 41eea76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adminforth/modules/codeInjector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ class CodeInjector implements ICodeInjector {
456456
const cc = action.customComponent;
457457
if (!cc) return;
458458

459-
const file = cc.file;
459+
const file = (typeof cc === 'string') ? cc : cc.file;
460460
if (!file) {
461461
throw new Error('customComponent.file is missing for action: ' + JSON.stringify({ id: action.id, name: action.name }));
462462
}

0 commit comments

Comments
 (0)