check if element is sortable before removing sortable property

This commit is contained in:
Benjamin Häublein 2015-09-26 14:32:14 +02:00
parent 9d11aaf829
commit 5234e97d5e
1 changed files with 3 additions and 1 deletions

View File

@ -273,7 +273,9 @@ function webSocketConnect() {
* some browsers, such as Safari, from changing the normalization form of the
* URI from NFD to NFC, breaking our link with MPD.
*/
$('#salamisandwich > tbody').sortable('destroy');
if ($('#salamisandwich > tbody').is(':ui-sortable')) {
$('#salamisandwich > tbody').sortable('destroy');
}
for (var item in obj.data) {
switch(obj.data[item].type) {
case "directory":