Skip to content

Commit 7ec591f

Browse files
authored
Fix undefined issues in onDJAdvance.js
1 parent 19648aa commit 7ec591f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

basicBot.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,7 @@
976976
}
977977
},
978978
eventDjadvance: function(obj) {
979+
if (!obj.dj) return;
979980
if (basicBot.settings.autowoot) {
980981
$('#woot').click(); // autowoot
981982
}
@@ -1114,6 +1115,8 @@
11141115
var remaining = obj.media.duration * 1000;
11151116
var startcid = API.getMedia().cid;
11161117
basicBot.room.autoskipTimer = setTimeout(function() {
1118+
if (!API.getMedia()) return;
1119+
11171120
var endcid = API.getMedia().cid;
11181121
if (startcid === endcid) {
11191122
//API.sendChat('Song stuck, skipping...');

0 commit comments

Comments
 (0)