set default value

pull/5370/head
filip mertens 3 years ago
parent 7201e496a8
commit 7f01a94daf
  1. 2
      libs/remix-ui/plugin-manager/src/lib/components/permissionsSettings.tsx

@ -18,7 +18,7 @@ function PermisssionsSettings ({ pluginSettings }: PermissionSettingsProps) {
const [permissions, setPermissions] = useLocalStorage<PluginPermissions>('plugins/permissions', {} as PluginPermissions)
const closeModal = () => setModalVisibility(true)
const openModal = () => {
const currentValue = JSON.parse(window.localStorage.getItem('plugins/permissions'))
const currentValue = JSON.parse(window.localStorage.getItem('plugins/permissions') || '{}')
setPermissions(currentValue)
setModalVisibility(!modalVisibility)
}

Loading…
Cancel
Save