Fix page chooser getValue so that it doesn't fail on an empty state

pull/6680/head
Matt Westcott 2021-01-05 17:47:31 +00:00 zatwierdzone przez Matt Westcott
rodzic afa9b16f13
commit 7b8d5f504c
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -28,7 +28,7 @@ function createPageChooser(id, openAtParentId, config) {
/* define public API functions for the chooser */
const chooser = {
getState: () => state,
getValue: () => state.id,
getValue: () => state && state.id,
setState: (newState) => {
if (newState) {
input.val(newState.id);