mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 11:32:38 +02:00
wip: do not call document during JS unittests
This commit is contained in:
parent
d61e045903
commit
50f2c08ecb
1 changed files with 2 additions and 0 deletions
|
@ -11,6 +11,8 @@ export class UndoManager {
|
|||
}
|
||||
|
||||
toggleState() {
|
||||
// document is undefined during unittests
|
||||
if (typeof document === 'undefined') return
|
||||
const undoButton = document.querySelector('.edit-undo')
|
||||
const redoButton = document.querySelector('.edit-redo')
|
||||
if (undoButton) undoButton.disabled = !this._undoStack.length
|
||||
|
|
Loading…
Reference in a new issue