Closed Bug 348421 Opened 18 years ago Closed 18 years ago

The install.js script causes silly strict warnings

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Gijs, Assigned: Gijs)

References

()

Details

Attachments

(1 file)

As in summary. 1.8 branch build reports:

Warning: function install does not always return a value
Source File: https://addons.mozilla.org/js/install.js
Line: 64

Warning: assignment to undeclared variable aPlatform
Source File: https://addons.mozilla.org/js/install.js
Line: 24
Attached patch PatchSplinter Review
Shut up silly warnings.
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Attachment #233349 - Flags: first-review?(morgamic)
Mike, how swamped are you, and/or is there anyone else I could ask review from? :-)
Attachment #233349 - Flags: first-review?(morgamic) → first-review+
Comment on attachment 233349 [details] [diff] [review]
Patch

Actually, bad idea.  I don't think it should return true by default.

Shouldn't the return false;  get taken out of the if() statement instead?
Attachment #233349 - Flags: first-review+ → first-review-
The install link is an href to the actual xpi file with an onClick to the install function. So, if they have JS disabled, it will still work.

Taking the return false; out of the if statement would cause the file not to be downloaded at all if for some reason the if() was not true.
Comment on attachment 233349 [details] [diff] [review]
Patch

Roger roger -- that's right ; it works.
Attachment #233349 - Flags: first-review- → first-review+
This has been checked in.  Will push with next update.  Thanks for submitting the patch.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: