Check we have some elements before creating a sortable
This commit is contained in:
parent
86ffcbb039
commit
5c29792d14
1 changed files with 6 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue