Make WordPress Core

Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#52365 closed defect (bug) (invalid)

includes/js/underscore.js missing var keyword on line 157

Reported by: Venutius Owned by:
Milestone: Priority: normal
Severity: trivial Version: 5.6
Component: External Libraries Keywords: has-patch
Focuses: Cc:


Hi there, this is my first bug, not exactly why my plugin chose to throw the error but I was getting "TypeError: i is undefined" error on a page from the underscore.js file and I was able to fix it by replacing line 157 with the following:

      for ( var i = 0, length = keys.length; i < length; i++) {
        iteratee(obj[keys[i]], keys[i], obj);

Change History (3)

#1 @SergeyBiryukov
9 months ago

  • Component changed from General to External Libraries
  • Keywords reporter-feedback added

Hi there, welcome back to WordPress Trac! Thanks for the ticket.

Just noting that there is var i a few lines above:

So it looks like the variable is already declared, and the suggested change would not make any difference.

Could you provide the steps to reproduce the issue on a clean install?

Please note that Undescore.js is an external library, any suggested changes should be submitted upstream:

#2 @Venutius
9 months ago

  • Resolution set to invalid
  • Severity changed from normal to trivial
  • Status changed from new to closed

Not sure what happened, I reverted my change but the error did not come back, it must have been a gitch I guess, we can close this ticket.

#3 @SergeyBiryukov
9 months ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted

Thanks for the follow-up!

Note: See TracTickets for help on using tickets.