diff --git a/packages/format-library/src/image/index.js b/packages/format-library/src/image/index.js index da19ddd58c494..5482be828375f 100644 --- a/packages/format-library/src/image/index.js +++ b/packages/format-library/src/image/index.js @@ -40,22 +40,22 @@ export const image = { } static getDerivedStateFromProps( props, state ) { - const { value, activeAttributes: { style } } = props; + const { activeAttributes: { style } } = props; - if ( value.start === state.previousStart ) { + if ( style === state.previousStyle ) { return null; } if ( ! style ) { return { width: undefined, - previousStart: value.start, + previousStyle: style, }; } return { width: style.replace( /\D/g, '' ), - previousStart: value.start, + previousStyle: style, }; }