diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2020-04-20 17:39:15 -0700 |
|---|---|---|
| committer | Carlton Gibson <carlton@noumenal.es> | 2020-04-29 10:22:41 +0200 |
| commit | 5d37cc703b2d3f100ca5c2c73fd456739cd80dd9 (patch) | |
| tree | 6e70b9947bee40969547578b4d07dd18517ca506 /js_tests/admin/jsi18n-mocks.test.js | |
| parent | 0dafadadb924e09ffd43287604cb4c2c6e353891 (diff) | |
Fixed #31493 -- Replaced var with const and let keywords in JavaScript.
The eslint configuration and the admin script compress.py have been
updated for ES6.
The unused fallback of globals.django in jquery.init.js was removed. It
is always included before jsi18n-mocks.test.js and it always sets the
global value.
Diffstat (limited to 'js_tests/admin/jsi18n-mocks.test.js')
| -rw-r--r-- | js_tests/admin/jsi18n-mocks.test.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js_tests/admin/jsi18n-mocks.test.js b/js_tests/admin/jsi18n-mocks.test.js index f04b0576f6..13d5b0e33c 100644 --- a/js_tests/admin/jsi18n-mocks.test.js +++ b/js_tests/admin/jsi18n-mocks.test.js @@ -1,6 +1,6 @@ (function(globals) { 'use strict'; - var django = globals.django || (globals.django = {}); + const django = globals.django; django.pluralidx = function(count) { return (count === 1) ? 0 : 1; }; @@ -69,7 +69,7 @@ }; django.get_format = function(format_type) { - var value = django.formats[format_type]; + const value = django.formats[format_type]; if (typeof value === 'undefined') { return format_type; } else { |
