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.

Error loop in 1.2 version of API docs if the URL is an invalid path #8518

Closed
@nlwillia

Description

@nlwillia

I started at https://docs.angularjs.org/api/ng/directive/ngModelOptions then I clicked the select box at the top and picked 1.2.21 to see if that feature was in 1.2.x. It wasn't, and when the path didn't exist, the 1.2.x version of the API docs melted down with an infinite error loop.

TypeError: Cannot read property 'path' of undefined
    at k.$scope.navClass (https://code.angularjs.org/1.2.21/docs/js/docs.js:93:47)
    at https://code.angularjs.org/1.2.21/angular.min.js:176:88
    at k.$eval (https://code.angularjs.org/1.2.21/angular.min.js:111:373)
    at https://code.angularjs.org/1.2.21/angular.min.js:140:192
    at https://code.angularjs.org/1.2.21/angular.min.js:66:64
    at k.$eval (https://code.angularjs.org/1.2.21/angular.min.js:111:373)
    at k.$digest (https://code.angularjs.org/1.2.21/angular.min.js:108:462)
    at k.$apply (https://code.angularjs.org/1.2.21/angular.min.js:112:173)
    at h (https://code.angularjs.org/1.2.21/angular.min.js:72:300)
    at w (https://code.angularjs.org/1.2.21/angular.min.js:77:288) angular.js:10023
TypeError: Cannot read property 'path' of undefined
    at k.$scope.navClass (https://code.angularjs.org/1.2.21/docs/js/docs.js:93:47)
    at Object.get (https://code.angularjs.org/1.2.21/angular.min.js:176:88)
    at k.$digest (https://code.angularjs.org/1.2.21/angular.min.js:109:78)
    at k.$apply (https://code.angularjs.org/1.2.21/angular.min.js:112:173)
    at h (https://code.angularjs.org/1.2.21/angular.min.js:72:300)
    at w (https://code.angularjs.org/1.2.21/angular.min.js:77:288)
    at XMLHttpRequest.A.onreadystatechange (https://code.angularjs.org/1.2.21/angular.min.js:78:375) 

This seems to be an issue throughout the 1.2 branch. 1.3 returns a not found page when the relative path doesn't exist. Since the docs run the version of angular they describe, there may not be a good solution for the older versions. But if at least the latest stable 1.2.x version worked, then this would be less likely to bite people. It's not a big deal in browsers with per-tab process isolation, but Firefox, for example, has to be killed completely which can result in lost work.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions