Check we have some elements before creating a sortable

This commit is contained in:
Daoud Clarke 2023-11-09 21:36:34 +00:00
parent 86ffcbb039
commit 5c29792d14

View file

@ -112,11 +112,12 @@ class ResultsHandler {
__initializeResults() {
this.results = document.querySelector('.results');
const sortable = new Sortable(this.results, {
"onStart": this.__sortableActivate.bind(this),
"onEnd": this.__sortableDeactivate.bind(this),
// "forceFallback": true,
});
if (this.results) {
const sortable = new Sortable(this.results, {
"onStart": this.__sortableActivate.bind(this),
"onEnd": this.__sortableDeactivate.bind(this),
});
}
this.curating = false;
}