Skip to content

Commit

Permalink
Merge pull request #65 from DFE-Digital/feature/DSI-3969-update-jquer…
Browse files Browse the repository at this point in the history
…y-3.6.0

Update jquery version and change deprecated trim function with JS def…
  • Loading branch information
ersumanta authored Aug 11, 2021
2 parents 75ecb4d + e2d0878 commit 82e1cd3
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion dist/gds-upgrade/javascript/app.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/gds-upgrade/javascript/vendors/jquery.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/javascript/app.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/javascript/vendors/jquery.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"govuk_frontend_toolkit": "^7.2.0",
"govuk_template_jinja": "^0.22.3",
"govuk-frontend": "^3.11.0",
"jquery": "^3.2.1",
"jquery": "^3.6.0",
"js-cookie": "^2.2.1",
"nunjucks": "^3.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/gds-upgrade/javascript/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if ($('select.select2').length > 0) {

function select2ModelMatcher (params, data) {
data.parentText = data.parentText || "";
if ($.trim(params.term) === '') {
if (typeof(params.term) === 'undefined' || !params.term || params.term.trim() === '') {
return data;
}
if (data.children && data.children.length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/pre-gds/javascript/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if ($('select.select2').length > 0) {

function select2ModelMatcher (params, data) {
data.parentText = data.parentText || "";
if ($.trim(params.term) === '') {
if (typeof(params.term) === 'undefined' || !params.term || params.term.trim() === '') {
return data;
}
if (data.children && data.children.length > 0) {
Expand Down

0 comments on commit 82e1cd3

Please sign in to comment.