1
0
Fork 0

🐛 Fixed SA draft option to hold value across renders

This commit is contained in:
Joost De Cock 2019-07-04 07:42:30 +02:00
parent 693b94a4e2
commit 2a4c6b8656
3 changed files with 26 additions and 4 deletions

View file

@ -66,6 +66,13 @@ const DraftSettings = props => {
childProps.parts[part] = <FormattedMessage id={"parts." + part} />;
}
}
if (
typeof props.gist !== "undefined" &&
typeof props.gist.settings !== "undefined" &&
typeof props.gist.settings[setting] !== "undefined"
)
childProps.value = props.gist.settings[setting];
else childProps.value = null;
return childProps;
};