But if I add in a reference to bonusFunction() I get an error...
Built with error:
File: cabbage/app/pages/index.us
TypeError: object is not a function
at eval (<anonymous>:11:9)
at template (~/src/cabbagejs/cabbage/node_modules/underscore/underscore.js:1336:21)
at ServerSideTemplateFilter.module.exports.ServerSideTemplateFilter.processString (~/src/cabbagejs/cabbage/lib/plugins/server-side-templates.coffee:14:5)
at ServerSideTemplateFilter.Filter.processFile (~/src/cabbagejs/cabbage/node_modules/broccoli-filter/index.js:136:31)
at Promise.resolve.then.catch.err.file (~/src/cabbagejs/cabbage/node_modules/broccoli-filter/index.js:82:21)
at $$$internal$$tryCatch (~/src/cabbagejs/cabbage/node_modules/broccoli-filter/node_modules/rsvp/dist/rsvp.js:470:16)
at $$$internal$$invokeCallback (~/src/cabbagejs/cabbage/node_modules/broccoli-filter/node_modules/rsvp/dist/rsvp.js:482:17)
at /Users/tsmith/src/cabbagejs/cabbage/node_modules/broccoli-filter/node_modules/rsvp/dist/rsvp.js:1066:13
at $$rsvp$asap$$flush (~/src/cabbagejs/cabbage/node_modules/broccoli-filter/node_modules/rsvp/dist/rsvp.js:1531:9)
at process._tickCallback (node.js:419:13)
And if I JSON.stringify(bonusFunction()), it's just {}. Which is kinda odd, since
So I have a given
config/application.js
And the following
app/pages/index.us
works successfully:But if I add in a reference to
bonusFunction()
I get an error...And if I
JSON.stringify(bonusFunction())
, it's just{}
. Which is kinda odd, since