diff --git a/static/js/coming-soon.js b/static/js/coming-soon.js index 5e53ab8..c9e7adc 100644 --- a/static/js/coming-soon.js +++ b/static/js/coming-soon.js @@ -14,7 +14,7 @@ }; const checkComingSoonStatus = async () => { - const result = {}; + let status; await window.wp .apiFetch( { @@ -23,17 +23,16 @@ } ) .then( ( response ) => { if ( response.hasOwnProperty( 'comingSoon' ) ) { - result.success = true; - result.comingSoon = response.comingSoon; + status = response.comingSoon; } else { - result.success = false; + status = null; } } ) .catch( () => { - result.success = false; + status = null; } ); - return result; + return status; }; const enableComingSoon = async () => {