kopia lustrzana https://github.com/wagtail/wagtail
Fix page chooser getValue so that it doesn't fail on an empty state
rodzic
afa9b16f13
commit
7b8d5f504c
|
@ -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);
|
||||
|
|
Ładowanie…
Reference in New Issue