Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#25994 closed defect (bug) (fixed)

jshint shouldn't throw errors: wp-admin/js/post.js

Reported by: atimmer's profile atimmer Owned by: nacin's profile nacin
Milestone: 3.8 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords:
Focuses: Cc:


51 errors to fix.

Attachments (1)

25994.1.diff (9.8 KB) - added by atimmer 10 years ago.

Download all attachments as: .zip

Change History (4)

10 years ago

#1 @atimmer
10 years ago

25994.1.diff brings it down to 2 errors, which are two functions defined in an if statement. I didn't want to interfere with these changes so I left them out.

When this patch lands I will make a patch to move the functions.

#2 @nacin
10 years ago

  • Milestone changed from Awaiting Review to 3.8

Basically, functions shouldn't be defined within blocks because weird behavior can occur based on the JS interpreter. Best thing to do is use a function expression, which is fine.

#3 @nacin
10 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 26204:

Fix JSHint errors in post.js.

props atimmer.
fixes #25994.

Note: See TracTickets for help on using tickets.