Update BASE.js

bug fix when an error occurs while loading a script.