Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ES2015 syntax results in TypeError: Cannot read property '1' of null #12424

Closed
@OlsonDev

Description

@OlsonDev

I put together this plunk to demonstrate the issue.

The issue itself (I'm reasonably sure) is the dependency annotator doesn't understand ES2015 syntax for shorthand method names even though the browser does (Chrome v43.0.2357.134 m, Windows 10).

The weird thing is it only matters for the controller key, best I can tell. If I use the same syntax for the link key, the TypeError doesn't happen and $scope is successfully injected.

Here's the full stack trace:

TypeError: Cannot read property '1' of null
    at Function.annotate (angular.js:3725)
    at Object.invoke (angular.js:4428)
    at $get.extend.instance (angular.js:8999)
    at nodeLinkFn (angular.js:8109)
    at compositeLinkFn (angular.js:7541)
    at compositeLinkFn (angular.js:7545)
    at compositeLinkFn (angular.js:7545)
    at publicLinkFn (angular.js:7416)
    at angular.js:1635
    at Scope.$get.Scope.$eval (angular.js:15846)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions