Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#25994 closed defect (bug) (fixed)

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

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

Description

51 errors to fix.

Attachments (1)

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

Download all attachments as: .zip

Change History (4)

@atimmer
13 years ago

#1 @atimmer
13 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
13 years ago

  • Milestone Awaiting Review3.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
13 years ago

  • Owner set to nacin
  • Resolutionfixed
  • Status newclosed

In 26204:

Fix JSHint errors in post.js.

props atimmer.
fixes #25994.

Note: See TracTickets for help on using tickets.