Update stack.js

throwinend event wasnt getting called.
Merge pull request #12 from MurWade/patch-2

Update stack.js