From 704eaa3a05023305651cf5a63997b91477c14192 Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Wed, 16 Dec 2020 15:29:55 +0100 Subject: [PATCH] Calypso editor: set Calypsoify for sites running Jetpack 9.2.1+ Follow-up from #47925 Jetpack's Calypsoify broke in version 9.2, and was then fixed in 9.2.1. We consequently only need to exclude sites that run 9.2 (alpha, betas, and stable). --- .../is-eligible-for-gutenframe.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/state/gutenberg-iframe-eligible/is-eligible-for-gutenframe.js b/client/state/gutenberg-iframe-eligible/is-eligible-for-gutenframe.js index 6b4ea41db084c..4854ba6aad362 100644 --- a/client/state/gutenberg-iframe-eligible/is-eligible-for-gutenframe.js +++ b/client/state/gutenberg-iframe-eligible/is-eligible-for-gutenframe.js @@ -12,14 +12,15 @@ import { getSiteOption } from 'calypso/state/sites/selectors'; import versionCompare from 'calypso/lib/version-compare'; export const isEligibleForGutenframe = ( state, siteId ) => { - // On some Jetpack sites (9.2+, not Atomic), - // Calypsoify is currently broken. + // On some Jetpack sites (9.2, not Atomic), + // Calypsoify is broken. // Let's not enable it for them. - // Reference: https://github.com/Automattic/jetpack/pull/17939 + // This problem was then fixed in Jetpack 9.2.1. const jetpackVersion = getSiteOption( state, siteId, 'jetpack_version' ); const isBrokenJetpack = jetpackVersion && versionCompare( jetpackVersion, '9.2-alpha', '>=' ) && + versionCompare( jetpackVersion, '9.2.1', '<=' ) && ! isAtomicSite( state, siteId ); return ! isBrokenJetpack && get( state, [ 'gutenbergIframeEligible', siteId ], true );