Update index.js

var presenceRef 
so presenceRef not global okdoky