From 477f3fc72f33409f8eb6ced37be09f0e733d3c89 Mon Sep 17 00:00:00 2001 From: Andy Trand Date: Mon, 29 Nov 2021 09:04:08 +0200 Subject: [PATCH] targetChild error temporary fix (#484) --- lib/src/widgets/editor.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/src/widgets/editor.dart b/lib/src/widgets/editor.dart index 48524ca1..c67e2e8a 100644 --- a/lib/src/widgets/editor.dart +++ b/lib/src/widgets/editor.dart @@ -1192,7 +1192,11 @@ class RenderEditableContainerBox extends RenderBox if (targetChild.getContainer() == targetNode) { break; } - targetChild = childAfter(targetChild); + final newChild = childAfter(targetChild); + if (newChild == null) { + break; + } + targetChild = newChild; } if (targetChild == null) { throw 'targetChild should not be null';