Fix rare crash if isOwner() is called before the global config is loaded
This commit is contained in:
parent
0b6e61bf25
commit
e95987a766
1 changed files with 1 additions and 1 deletions
|
@ -232,7 +232,7 @@ export function getBaseUrl(pluginData: AnyPluginData<any>) {
|
|||
|
||||
export function isOwner(pluginData: AnyPluginData<any>, userId: string) {
|
||||
const knub = pluginData.getKnubInstance() as TZeppelinKnub;
|
||||
const owners = knub.getGlobalConfig().owners;
|
||||
const owners = knub.getGlobalConfig()?.owners;
|
||||
if (!owners) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue