Skip to content

Commit

Permalink
Fix ClassCastException caused by assuming editorFragment was a Gutenb…
Browse files Browse the repository at this point in the history
…ergEditorFragment when it could be a GutenbergKitEditorFragment (for 25.6.1)
  • Loading branch information
nbradbury committed Feb 6, 2025
1 parent ead73cb commit 350f043
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3991,8 +3991,7 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm

@Subscribe(threadMode = ThreadMode.MAIN)
fun onEventMainThread(event: ConnectionChangeEvent) {
if (editorFragment !is GutenbergNetworkConnectionListener) return
(editorFragment as GutenbergEditorFragment).onConnectionStatusChange(event.isConnected)
(editorFragment as? GutenbergNetworkConnectionListener)?.onConnectionStatusChange(event.isConnected)
}

private fun refreshEditorTheme() {
Expand Down

0 comments on commit 350f043

Please sign in to comment.