Skip to content

Commit

Permalink
Merge pull request #20862 from wordpress-mobile/issue/20831-crash
Browse files Browse the repository at this point in the history
Fix crash in GutenbergContainerFragment
  • Loading branch information
irfano authored Jun 7, 2024
2 parents 11f13c8 + 5a36d78 commit 8f259b9
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,13 @@ public void onActivityResult(int requestCode, int resultCode, @Nullable Intent d
String blockId = data.getStringExtra(WPGutenbergWebViewActivity.ARG_BLOCK_ID);
String content = data.getStringExtra(WPGutenbergWebViewActivity.ARG_BLOCK_CONTENT);
getGutenbergContainerFragment().replaceUnsupportedBlock(content, blockId);
if (mCurrentGutenbergPropsBuilder == null) {
SavedInstanceDatabase db = SavedInstanceDatabase.Companion.getDatabase(getContext());
if (db != null) {
mCurrentGutenbergPropsBuilder = db.getParcel(ARG_GUTENBERG_PROPS_BUILDER,
GutenbergPropsBuilder.CREATOR);
}
}
// We need to send latest capabilities as JS side clears them
getGutenbergContainerFragment().updateCapabilities(mCurrentGutenbergPropsBuilder);
trackWebViewClosed("save");
Expand Down

0 comments on commit 8f259b9

Please sign in to comment.