Update core.js

Improve the condition to triple equal.