Skip to content

[4.0] Make check for package ID or extension ID type safe in pre-update-check javascript#33487

Closed
richard67 wants to merge 3 commits intojoomla:4.0-devfrom
richard67:4.0-dev-fix-pre-update-check-after-upmerge-1
Closed

[4.0] Make check for package ID or extension ID type safe in pre-update-check javascript#33487
richard67 wants to merge 3 commits intojoomla:4.0-devfrom
richard67:4.0-dev-fix-pre-update-check-after-upmerge-1

Conversation

@richard67
Copy link
Copy Markdown
Member

Pull Request for Issue #33477 (part) .

Summary of Changes

  • Use parseInt to get values from data-extension-id and the package_id and extension_id properties of the particular non-core extension object.
  • Let the parseInt from data-extension-id default to zero in order not to match with NaN in later type safe comparison.
  • Use type safe comparison to compare the value from data-extension-id with the package_id and the extension_id properties of the non-core extension.

Testing Instructions

Will be added soon.

Actual result BEFORE applying this Pull Request

The pre-update check works more or less in the 4.0-dev branch after the recent upmerge from 3.10-dev.

The javascript cs in drone fails due to type safe comparison being required.

Expected result AFTER applying this Pull Request

The pre-update check works as well or bad as without this PR.

The javascript cs in drone passes.

Documentation Changes Required

None.

Question

@zero-24 @wilsonge Should that be done in 3.10-dev, too?

@joomla-cms-bot joomla-cms-bot added NPM Resource Changed This Pull Request can't be tested by Patchtester PR-4.0-dev labels May 2, 2021
@richard67 richard67 closed this May 2, 2021
@richard67 richard67 deleted the 4.0-dev-fix-pre-update-check-after-upmerge-1 branch May 2, 2021 14:47
@richard67 richard67 restored the 4.0-dev-fix-pre-update-check-after-upmerge-1 branch May 2, 2021 14:54
This was referenced May 2, 2021
@richard67 richard67 deleted the 4.0-dev-fix-pre-update-check-after-upmerge-1 branch May 25, 2021 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NPM Resource Changed This Pull Request can't be tested by Patchtester

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants