diff --git a/code/extensions/JSONTextExtension.php b/code/extensions/JSONTextExtension.php index 542e746..64e70bb 100644 --- a/code/extensions/JSONTextExtension.php +++ b/code/extensions/JSONTextExtension.php @@ -62,10 +62,11 @@ public function onBeforeWrite() $owner = $this->getOwner(); $controller = \Controller::curr(); $postVars = $controller->getRequest()->postVars(); + $fieldMap = $owner->config()->get('json_field_map'); $doUpdate = ( count($postVars) && in_array(get_class($controller), ['CMSPageEditController', 'FakeController']) && - !empty($owner->config()->get('json_field_map')) + !empty($fieldMap) ); if (!$doUpdate) {