Opened 3 years ago

Closed 3 years ago

#18327 closed Bug (fixed)

Global scope leaking in admin's actions.js

Reported by: tswicegood Owned by: nobody
Component: contrib.admin Version: master
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 Changed 3 years ago by jezdez

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.
Back to Top