Update script-base.js

Fix for ignored switch.