From 09a73eaabb6ccff928e6f3233c9c97731fd26e04 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Mon, 13 Sep 2021 14:31:31 +0200 Subject: [PATCH] fix arrays --- .../plugin-manager/src/lib/components/LocalPluginForm.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/remix-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx b/libs/remix-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx index c6762a5161..89c220e3f3 100644 --- a/libs/remix-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx +++ b/libs/remix-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx @@ -6,6 +6,7 @@ import { IframePlugin, WebsocketPlugin } from '@remixproject/engine-web' import { localPluginReducerActionType, localPluginToastReducer } from '../reducers/pluginManagerReducer' import { FormStateProps, PluginManagerComponent } from '../../types' +import { isArray } from 'util' interface LocalPluginFormProps { closeModal: () => void @@ -49,10 +50,10 @@ function LocalPluginForm ({ closeModal, visible, pluginManager }: LocalPluginFor setName(storagePlugin.name) setUrl(storagePlugin.url) setLocation(storagePlugin.location as 'sidePanel' | 'mainPanel' | 'none') - setMethods(storagePlugin.methods) + setMethods(isArray(storagePlugin.methods) ? storagePlugin.methods.join(',') : storagePlugin.methods) setType(storagePlugin.type) setDisplayName(storagePlugin.displayName) - setCanactivate(storagePlugin.canActivate) + setCanactivate(isArray(storagePlugin.canActivate) ? storagePlugin.canActivate.join(',') : storagePlugin.canActivate) }, []) const handleModalOkClick = async () => {