Skip to content

Commit

Permalink
Update react-plugin-factory.ts to handle missing entrypoint
Browse files Browse the repository at this point in the history
Signed-off-by: 1000TurquoisePogs <[email protected]>
  • Loading branch information
1000TurquoisePogs authored Aug 27, 2024
1 parent 2540a79 commit eeec2b0
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ interface MvdNativeReactPluginComponentDefinition {
export class ReactPluginFactory extends PluginFactory {
private readonly logger: ZLUX.ComponentLogger = BaseLogger;
private static getReactModuleURL(pluginDefinition: MVDHosting.DesktopPluginDefinition): string {
// TODO: clean this up with .d.ts file
let entryPoint = pluginDefinition.getBasePlugin().getWebEntryPoint() || 'main.js';
return ZoweZLUX.uriBroker.pluginResourceUri(pluginDefinition.getBasePlugin(), entryPoint);
let pluginDefBase = pluginDefinition.getBasePlugin();
let pluginDefAny:any = (pluginDefBase as any);
let entryPoint = 'main.js';
if (pluginDefAny.getWebEntryPoint) {
entryPoint = pluginDefAny.getWebEntryPoint() || 'main.js';
}
return ZoweZLUX.uriBroker.pluginResourceUri(pluginDefBase, entryPoint);
}

private static getReactComponentsURL(pluginDefinition: MVDHosting.DesktopPluginDefinition): string {
Expand Down

0 comments on commit eeec2b0

Please sign in to comment.