Fix editMenuMenuParent breaking when menu has no parent

Created on 12 August 2024, 7 months ago
Updated 24 August 2024, 6 months ago

When there is no parent menu, the JavaScript can break since we're not checking to make sure editMenuMenuParent is a thing.

🐛 Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

🇨🇦Canada RobLoach Earth

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @RobLoach
  • Status changed to Needs review 7 months ago
  • First commit to issue fork.
  • 🇯🇵Japan ultrabob Japan

    @robloach, I have confirmed that this issue exists, but this change doesn't seem to fix it. In my testing editMenuMenuParent was always defined, but an error happens later around line 193 where we try to get the parent menu title:

    let currentParentTitle = currentOption.innerText.substring(
      currentOption.innerText.indexOf(' '),
    );

    currentOption has just been defined as null. so getting innerText is not possible. I think this is a pretty big problem of a bug, but I don't have the time to try and debug it at the moment.

  • Status changed to Needs work 6 months ago
Production build 0.71.5 2024