Fixed undefined check on 'device' in 'home.js'