updated the js component to match the coffeescript component snippet