Fixes null pointer when setting documents. (#974)

pull/978/head
Benjamin Quinn 3 years ago committed by GitHub
parent 5516e70f63
commit b7b1afc9e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      lib/src/widgets/controller.dart

@ -40,6 +40,10 @@ class QuillController extends ChangeNotifier {
Document get document => _document;
set document(doc) {
_document = doc;
// Prevent the selection from
_selection = const TextSelection(baseOffset: 0, extentOffset: 0);
notifyListeners();
}

Loading…
Cancel
Save