-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Avoid empty Gallery block error #49557
Conversation
Setting a default function parameter avoids an error when `innerBlockImages` is `undefined`. This default function parameter may be unnecessary and masking a underlying issue.
Size Change: 0 B Total Size: 1.37 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good. I tested on Android and everything passed.
Thanks for adding the test!
Flaky tests detected in b7d430b. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4639078854
|
…-empty-gallery-block-error
* fix: Avoid empty Gallery block error Setting a default function parameter avoids an error when `innerBlockImages` is `undefined`. This default function parameter may be unnecessary and masking a underlying issue. * docs: Add change log entry
* Release script: Update react-native-editor version to 1.92.0 * Release script: Update with changes from 'npm run core preios' * docs: Update change log * Release script: Update react-native-editor version to 1.92.1 * Release script: Update with changes from 'npm run core preios' * fix: Avoid empty Gallery block error (#49557) * fix: Avoid empty Gallery block error Setting a default function parameter avoids an error when `innerBlockImages` is `undefined`. This default function parameter may be unnecessary and masking a underlying issue. * docs: Add change log entry * docs: Remove duplicate change log entry
There were conflicts on `Podfile` and `Podfile.lock` because `release/22.1` and `trunk` both changed the Gutenberg version. As usual, I resolved them with `git checkout --theirs`, keeping the value from `trunk` under the assumption that the latest version of Gutenberg, 1.93.0-alpha2, is what `trunk` needs to work and that if the 1.92.1 hotfix hasn't already been integrated in the latest release, it will be soon and the Gutenberg team will followup with a new version update on `trunk`. There was also a conflict on the `RELEASE-NOTES.txt` that GitHub picked up with its more refined conflicts engine and that auto-merge didn't address properly but that I manually fixed. That was due to `release/22.1` adding new release note entries – which will not make it into the App Store release notes – in the 22.1 section and `trunk` having #20128 editing that section, too. #20128 was meant to land on `release/22.1` but I forgot to update the base branch after starting the code freeze 🤦♂️😭 ``` <<<<<<< release/22.1 -- Incoming Change * [**] Add a "Personalize Home Tab" button to the bottom of the Home tab that allows changing cards visibility. [#20369] * [*] [Reader] Fix an issue that was causing the app to crash when tapping the More or Share buttons in Reader Detail screen. [#20490] * [*] Block editor: Avoid empty Gallery block error [WordPress/gutenberg#49557] ======= * [**] [internal] Refactored Google SignIn implementation to not use the Google SDK [#20128] >>>>>>> trunk -- Current Change ```
There were conflicts on `Podfile` and `Podfile.lock` because `release/22.1` and `trunk` both changed the Gutenberg version. As usual, I resolved them with `git checkout --theirs`, keeping the value from `trunk` under the assumption that the latest version of Gutenberg, 1.93.0-alpha2, is what `trunk` needs to work and that if the 1.92.1 hotfix hasn't already been integrated in the latest release, it will be soon and the Gutenberg team will followup with a new version update on `trunk`. There was also a conflict on the `RELEASE-NOTES.txt` that GitHub picked up with its more refined conflicts engine and that auto-merge didn't address properly but that I manually fixed. That was due to `release/22.1` adding new release note entries – which will not make it into the App Store release notes – in the 22.1 section and `trunk` having #20128 editing that section, too. #20128 was meant to land on `release/22.1` but I forgot to update the base branch after starting the code freeze 🤦♂️😭 Also, the entry about the personalize home tab had been removed on `trunk` via ec8a377. The release notes editor was notified about it, #20483 (review) ``` <<<<<<< release/22.1 -- Incoming Change * [**] Add a "Personalize Home Tab" button to the bottom of the Home tab that allows changing cards visibility. [#20369] * [*] [Reader] Fix an issue that was causing the app to crash when tapping the More or Share buttons in Reader Detail screen. [#20490] * [*] Block editor: Avoid empty Gallery block error [WordPress/gutenberg#49557] ======= * [**] [internal] Refactored Google SignIn implementation to not use the Google SDK [#20128] >>>>>>> trunk -- Current Change ```
What?
Fixes wordpress-mobile/gutenberg-mobile#5495.
Avoid an error that occurs when the
innerBlocks
attribute isundefined
within a Gallery block. The error was surfaced in Sentry error reports.
wordpress-mobile/gutenberg-mobile#5495
Why?
The error results in the mobile editor crashing.
How?
Setting a default function parameter avoids an error when
innerBlockImages
isundefined
.This default function parameter may be unnecessary and masking a underlying
issue. It is worth investigating this circumstance further in the future.
Testing Instructions
Verify the test instructions found in #42178 succeed.
Testing Instructions for Keyboard
n/a
Screenshots or screencast
n/a