Skip to content

bug alpha 6-3 - url_resolver.js:238Uncaught TypeError: uri.match is not a function, when using latest compiler-builds #963

Closed
@qdouble

Description

@qdouble

Building a project with alpha 6-3 and the latest compiler build using ngModules seems to crash when you use materials modules. This commit to the compiler broke it: angular/angular@83e2d3d

On line 238 of url_resolver.js, if you change

function _split(uri) {
    return uri.match(_splitRe);
}

to

function _split(uri) {
   if (typeof uri === 'string')
    return uri.match(_splitRe);
}

it will work, as it appears that the material modules are exporting numbers instead of strings. If I console.log uri, MdButtonModule will pass it the number 436 and also the string 'package:436' for example. The number is causing the crash.

I know it was mentioned that this is experimental release, but just making sure that this is a known issue and addressed before next release.

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