Fix tests

[MAILPOET-2278]
This commit is contained in:
Amine Ben hammou
2019-10-17 11:05:39 +01:00
committed by Jack Kitterhing
parent ad899e436c
commit 1aa675c35a

View File

@ -20,8 +20,10 @@ Module.save = function () {
// Stringify to enable transmission of primitive non-string value types
if (!_.isUndefined(json.body)) {
delete json.body.blockDefaults.woocommerceHeading;
delete json.body.blockDefaults.woocommerceContent;
if (json.body.blockDefaults) {
delete json.body.blockDefaults.woocommerceHeading;
delete json.body.blockDefaults.woocommerceContent;
}
json.body = JSON.stringify(json.body);
}