Fixing syntax in js example.

open and close-stache were missing from the `if (!error)`