I'm using Express + Handlebars with the library.
When I enable objectNotation, the project crashes. With object notation disabled, regular key/value pairs work just fine.
TypeError: /Users/mrg/WebstormProjects/myproj/views/error.hbs: Cannot read property 'indexOf' of undefined
at translate (/Users/mrg/WebstormProjects/myproj/node_modules/i18n/i18n.js:862:34)
at Object.i18nTranslate (/Users/mrg/WebstormProjects/myproj/node_modules/i18n/i18n.js:220:13)
at Object.<anonymous> (/Users/mrg/WebstormProjects/myproj/app.js:33:20)
at Object.eval [as main] (eval at createFunctionContext (/Users/mrg/WebstormProjects/myproj/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:254:23), <anonymous>:6:66)
at main (/Users/mrg/WebstormProjects/myproj/node_modules/handlebars/dist/cjs/handlebars/runtime.js:173:32)
at ret (/Users/mrg/WebstormProjects/myproj/node_modules/handlebars/dist/cjs/handlebars/runtime.js:176:12)
at ret (/Users/mrg/WebstormProjects/myproj/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:525:21)
at /Users/mrg/WebstormProjects/myproj/node_modules/hbs/lib/hbs.js:87:17
at /Users/mrg/WebstormProjects/myproj/node_modules/hbs/lib/hbs.js:69:11
at Object.done (/Users/mrg/WebstormProjects/myproj/node_modules/hbs/lib/async.js:74:20)
Just encountered the same issue today in 2021. You have to turn that feature on by specifying the field "objectNotation" to be true in the configuration
I'm using Express + Handlebars with the library. When I enable objectNotation, the project crashes. With object notation disabled, regular key/value pairs work just fine.
Relevant code:
Route
Template
Locale
Error message: