Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
this.appBridgeResourcePicker.unsubscribe();
if (onSelection != null) {
this.appBridgeResourcePicker.subscribe(
AppBridgeResourcePicker.Action.SELECT,
({selection}) => {
onSelection({selection});
},
);
}
if (onCancel != null) {
this.appBridgeResourcePicker.subscribe(
AppBridgeResourcePicker.Action.CANCEL,
onCancel,
);
}
if (wasOpen !== open) {
if (open) {
this.appBridgeResourcePicker.dispatch(
AppBridgeResourcePicker.Action.OPEN,
);
} else {
this.appBridgeResourcePicker.dispatch(
AppBridgeResourcePicker.Action.CLOSE,
);
}
}