Make WordPress Core

Opened 20 months ago

Last modified 17 months ago

#38646 new defect (bug)

wp-embed.min.js contains extra code

Reported by: szepe.viktor Owned by:
Milestone: Awaiting Review Priority: normal
Severity: trivial Version: 4.5
Component: Embeds Keywords: close
Focuses: Cc:



"else" is not in wp-embed.js!

Could it be an Uglify2JS issue? https://github.com/aaronjorbin/develop.wordpress/blob/master/Gruntfile.js#L444-L456

Change History (4)

#1 @szepe.viktor
20 months ago

Props markoheijnen

#2 @dd32
20 months ago

This isn't a regression in the uglify process in 4.7, although does seem like extra code at first glance.

The else; has been there since https://build.trac.wordpress.org/changeset/35672/trunk/wp-includes/js/wp-embed.min.js which seems to stem from the conditionals: false in r35708 which is required to avoid the && issue in #34698.

#3 @swissspidy
17 months ago

  • Keywords close added
  • Severity changed from normal to trivial
  • Version changed from 4.6.1 to 4.5

This should indeed be reported upstream as it's specific to the conditionals: false setting in UglifyJS2. I get the same errant else in their online demo. Perhaps there's even a valid reason for it that we just don't know about.

Note: See TracTickets for help on using tickets.