0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Added TODO to settings input serializers

no issue

- we need these rules globally
This commit is contained in:
kirrg001 2019-03-11 17:25:12 +01:00 committed by Katharina Irrgang
parent e19cd6a919
commit 0c583135ba

View file

@ -26,6 +26,8 @@ module.exports = {
setting.value = JSON.stringify(setting.value);
}
// @TODO: handle these transformations in a centralised API place (these rules should apply for ALL resources)
// CASE: Ensure we won't forward strings, otherwise model events or model interactions can fail
if (setting.value === '0' || setting.value === '1') {
setting.value = !!+setting.value;