Update function.js

fix bind bug