From 3ff209434ab842fb443ba1a4f531696eaa54afb1 Mon Sep 17 00:00:00 2001 From: Tomek Zawadzki Date: Wed, 31 Jan 2024 14:09:32 +0100 Subject: [PATCH] Restore cleanup --- ios/MarkdownTextInputDecoratorView.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ios/MarkdownTextInputDecoratorView.mm b/ios/MarkdownTextInputDecoratorView.mm index bfcdc898..f55ebbcc 100644 --- a/ios/MarkdownTextInputDecoratorView.mm +++ b/ios/MarkdownTextInputDecoratorView.mm @@ -89,10 +89,10 @@ - (void)willMoveToWindow:(UIWindow *)newWindow } if (_textView != nil) { [_textView setMarkdownUtils:nil]; -// if (_textView.layoutManager != nil && [object_getClass(_textView.layoutManager) isEqual:[MarkdownLayoutManager class]]) { -// [_textView.layoutManager setValue:nil forKey:@"markdownUtils"]; -// object_setClass(_textView.layoutManager, [NSLayoutManager class]); -// } + if (_textView.layoutManager != nil && [object_getClass(_textView.layoutManager) isEqual:[MarkdownLayoutManager class]]) { + [_textView.layoutManager setValue:nil forKey:@"markdownUtils"]; + object_setClass(_textView.layoutManager, [NSLayoutManager class]); + } } }