Check the console with this JSFiddle which says the following in Chrome:
Uncaught TypeError: handlerHelper(...) is not a function
"use strict" function parseRoute(route, Handlers){ let parsed = Handlers route.split('->').forEach(function(s){ parsed.hasOwnProperty(s) && (parsed = parsed[s]) }) return parsed } function handlerHelper(Handlers, ev){ let parsed = parseRoute(ev.name, Handlers) applyHandlers(parsed, ev) } function applyHandlers(obj, ev){ for (let i in obj) { if (obj.hasOwnProperty(i)){ console.log(handlerHelper, typeof handlerHelper) typeof obj[i] === 'object' && handlerHelper(obj[i], ev) (i = obj.handlers) && i.length && i.forEach(function(fn){ fn.apply(null, ev) }) } } } handlerHelper({ $: { handlers: [function(){}] } }, { name: '$->Test' }) On the console it clearly says it is function. This is a recursive function and it throws only after in the 3rd iteration. Really weird. Any clues about what's the problem?
;. Also, I'd personally avoid using the return value of an assignment as a logical condition like you're doing, as well as logical operators for flow control. Let your minifier handle that.