Update extendFunction.js