Opened 12 years ago

Closed 12 years ago

#18327 closed Bug (fixed)

Global scope leaking in admin's actions.js

Reported by: Travis Swicegood Owned by: nobody
Component: contrib.admin Version: dev
Severity: Normal Keywords: javascript
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Inside the action.js file in there are a handful of functions that are defined without the proper variable declaration, so they end up in the global scope. While in there, I also cleaned up a few issues that throw basic linters for a loop.

  • There was a variable redeclared inside a callback where it was an argument (already at function scope)
  • Added a few missing semi-colons
  • Made the comparison for shiftKey an exact equals (=== vs. ==)

Patch is available here: https://github.com/django/django/pull/70

Change History (1)

comment:1 by Jannis Leidel, 12 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top