diff --git a/src/ng1/statebuilders/views.ts b/src/ng1/statebuilders/views.ts index c0a3f97de..3c0a2b4fe 100644 --- a/src/ng1/statebuilders/views.ts +++ b/src/ng1/statebuilders/views.ts @@ -88,7 +88,7 @@ const scopeBindings = (bindingsObj: Obj) => Object.keys(bindingsObj || {}) // [ 'input', [ '=foo', '=', 'foo' ] ] .map(key => [key, /^([=<@])[?]?(.*)/.exec(bindingsObj[key])]) // skip malformed values - .filter(tuple => isDefined(tuple) && isDefined(tuple[1])) + .filter(tuple => isDefined(tuple) && isArray(tuple[1])) // { name: ('foo' || 'input'), type: '=' } .map(tuple => ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] } as BindingTuple)); diff --git a/test/viewDirectiveSpec.js b/test/viewDirectiveSpec.js index a85c6e54d..d896fb3ea 100644 --- a/test/viewDirectiveSpec.js +++ b/test/viewDirectiveSpec.js @@ -832,6 +832,11 @@ describe('angular 1.5+ style .component()', function() { bindings: { oneway: '