diff --git a/src/js/OTSession.coffee b/src/js/OTSession.coffee index b3848ce6..e6b9288f 100644 --- a/src/js/OTSession.coffee +++ b/src/js/OTSession.coffee @@ -115,10 +115,10 @@ class TBSession return Cordova.exec(TBSuccess, TBError, OTPlugin, "unpublish", [] ) unsubscribe: (subscriber) -> console.log("JS: Unsubscribe") - elementId = subscriber.streamId - element = document.getElementById( "TBStreamConnection#{elementId}" ) + streamId = subscriber.streamId + element = document.getElementById( "TBStreamConnection#{streamId}" ) console.log("JS: Unsubscribing") - element = streamElements[ elementId ] + element = streamElements[ streamId ] if(element) element.parentNode.removeChild(element) delete( streamElements[ streamId ] )