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

Fix for issue 3616 "View source" link on docs is broken #3675

Closed
wants to merge 5 commits into from
Closed

Fix for issue 3616 "View source" link on docs is broken #3675

wants to merge 5 commits into from

Conversation

jamesdaily
Copy link
Contributor

This solves Issue #3616

"View source" link on docs is broken because it references undefined property gruntUtil.getVersion().number.

I've changed two references to instead use gruntUtil.getVersion().cdnVersion, which presently contains an appropriate string (a git tag) for linking to documentation.

(If this is not an acceptable version property to reference, perhaps there is a better one? Or, as a temporary fix perhaps we should just link to the "master" code source instead of the grunt version tagged source file.)

Updated sourceLinkSpec.js to use gruntUtil.getVersion().cdnVersion instead of the undefined gruntUtil.getVersion().number.

#3616
…on().cdnVersion

Update "View source" api documentation link to use gruntUtil.getVersion().cdnVersion, since gruntUtil.getVersion().number is undefined

#3616
In reaction to Issue 3616, I've added a check that the version code embedded in the View Source link is in fact a defined value. Previously, it referenced gruntUtil.getVersion().number which was an undefined value.
Replaced cdnVersion with just cdn in View Source link

it("should have a defined gruntUtil.getVersion().cdn property", function () {
expect(gruntUtil.getVersion().cdn).toBeDefined();
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test doesn't belong into this file. I would just remove it from here as we currently don't have a good way to test grunt/utils.js

IgorMinar pushed a commit to IgorMinar/angular.js that referenced this pull request Aug 21, 2013
@IgorMinar
Copy link
Contributor

I fixed your test by using a spy. See the commit referencing this PR.

@IgorMinar IgorMinar closed this in 5c4ffb3 Aug 21, 2013
@jamesdaily
Copy link
Contributor Author

Thanks, spyOn is a good approach here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants