Skip to content

Menu item is undefined in models/menu::getMenuModel #3

@jared-stilwell

Description

@jared-stilwell

Refiling this bug from the original repo

Raised initially here:

philbooth/complexity-report#43

This is the stack trace:

GET / 500 2ms
TypeError: Cannot call method 'trim' of undefined
at Object.menu (/mnt/data/1/models/menu.js:9:32)
at Object.Hogan.Template.ms (/mnt/data/1/node_modules/hogan-express/node_modules/hogan.js/lib/template.js:226:25)
at Object.Hogan.Template.s (/mnt/data/1/node_modules/hogan-express/node_modules/hogan.js/lib/template.js:124:20)
at Object.eval [as r](eval at %28/mnt/data/1/node_modules/hogan-express/node_modules/hogan.js/lib/compiler.js:293:21%29, :2:252)
at Object.Hogan.Template.ri (/mnt/data/1/node_modules/hogan-express/node_modules/hogan.js/lib/template.js:46:19)
at Object.Hogan.Template.rp (/mnt/data/1/node_modules/hogan-express/node_modules/hogan.js/lib/template.js:96:22)
at Object.eval [as r](eval at %28/mnt/data/1/node_modules/hogan-express/node_modules/hogan.js/lib/compiler.js:293:21%29, :2:995)
at Object.Hogan.Template.ri (/mnt/data/1/node_modules/hogan-express/node_modules/hogan.js/lib/template.js:46:19)
at Object.render (/mnt/data/1/node_modules/hogan-express/node_modules/hogan.js/lib/template.js:41:19)
at /mnt/data/1/node_modules/hogan-express/hogan-express.js:167:29

This is the hack I've patched it with for now:

a4dfde0

The question is, why is menuitem undefined?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions