0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-07 23:08:24 -05:00

🐛 Fix selectAll when editor is empty

This commit is contained in:
AzazelN28 2024-11-27 11:42:18 +01:00
parent 30a06249ff
commit 7101b94557

View file

@ -479,6 +479,9 @@ export class SelectionController extends EventTarget {
* Selects all content.
*/
selectAll() {
if (this.#textEditor.isEmpty) {
return this
}
this.#selection.selectAllChildren(this.#textEditor.root);
return this;
}