I’m trying to get sendbird up and running, and as for the tutorial i downloaded the sendbird.min.js file from the github repository. However, when I’m trying to use SendBird in another js file, it is undefined.
This is the HTML i use, and here’s an example for main.js:
function checkBird(){
if (typeof(SendBird) === ‘undefined’) {
console.log(‘SendBird is undefined’);
setTimeout(checkBird, 300);
}
else{
console.log(‘SendBird is defined’);
}
}
checkBird();
this logs undefined perpetually. Thanks in advance for any hints.
Thanks alot! Unfortunately the issue persists after fixing the typo:
function checkBird(){
if (typeof(Sendbird) === ‘undefined’) {
console.log(‘Sendbird is undefined’);
setTimeout(checkBird, 300);
}
else{
console.log(‘Sendbird is defined’);
}
}