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.7)
  • Loading branch information
nbradbury committed Feb 6, 2025
1 parent 866eec8 commit 7c459e0
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4037,8 +4037,7 @@ class EditPostActivity : BaseAppCompatActivity(), EditorFragmentActivity, Editor

@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 7c459e0

Please sign in to comment.