Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix data.title replace when it's null/undefined #2719

Merged
merged 1 commit into from
Nov 17, 2022
Merged

Fix data.title replace when it's null/undefined #2719

merged 1 commit into from
Nov 17, 2022

Conversation

luigifab
Copy link
Contributor

@luigifab luigifab commented Nov 17, 2022

Description

This fix one error (I don't remember when it happen, I found it with Sentry), here is a way to reproduce it manually:

09:37:42,200 > a = {};
09:37:53,486 > a.title.replace('"', """);
09:37:53,558 < Uncaught TypeError: a.title is undefined
09:38:01,969 > a = { title: null };
09:38:05,307 > a.title.replace('"', "&quot;");
09:38:05,380 < Uncaught TypeError: a.title is null
09:38:41,052 > a = { title: undefined };
09:38:43,659 > a.title.replace('"', "&quot;");
09:38:43,731 < Uncaught TypeError: a.title is undefined

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)
  • Add yourself to contributors list

@github-actions github-actions bot added Component: Adminhtml Relates to Mage_Adminhtml Component: Bundle Relates to Mage_Bundle Template : admin Relates to admin template labels Nov 17, 2022
@sreichel sreichel merged commit 278270d into OpenMage:1.9.4.x Nov 17, 2022
@luigifab luigifab deleted the check-title branch November 18, 2022 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Adminhtml Relates to Mage_Adminhtml Component: Bundle Relates to Mage_Bundle Template : admin Relates to admin template
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants