Skip to content

Commit

Permalink
Merge pull request #8619 from cfpb/ans_cleanup
Browse files Browse the repository at this point in the history
Minor JS cleanup
  • Loading branch information
anselmbradford authored Oct 30, 2024
2 parents 3c3e351 + e9fb10a commit e310b92
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let _sessionStorage;
try {
_localStorage = window.localStorage;
_sessionStorage = window.sessionStorage;
} catch (err) {
} catch {
_localStorage = null;
_sessionStorage = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function _getStorageType(storage) {
if (typeof _storage === 'undefined') {
try {
storage = window.sessionStorage;
} catch (err) {
} catch {
// SecurityError was thrown if cookies are off.
storage = {};
}
Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/apps/regulations3k/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function handleFilter(event) {
/* eslint no-empty: ["error", { "allowEmptyCatch": true }] */
try {
searchRequest.abort();
} catch (err) {}
} catch {}
const searchContainer = document.querySelector('#regs3k-results');
const filters = document.querySelectorAll('input:checked');
const searchField = document.querySelector('input[name=q]');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function handleFilter(event, target = null) {
/* eslint no-empty: ["error", { "allowEmptyCatch": true }] */
try {
searchRequest.abort();
} catch (err) {}
} catch {}
target = target ? target : event.target;
const wrapperLI = target.parentElement.parentElement;
if (wrapperLI && wrapperLI.tagName.toLowerCase() === 'li') {
Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/modules/util/web-storage-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function _getStorageType(storage) {
if (typeof _storage === 'undefined') {
try {
storage = window.sessionStorage;
} catch (err) {
} catch {
// SecurityError was thrown if cookies are off.
storage = {};
}
Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/js/organisms/FormSubmit.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function FormSubmit(element, baseClass, opts) {
result = response.result;
message = response.message || '';
heading = response.heading || '';
} catch (err) {
} catch {
// ignore lack of response
}
state = result === 'fail' ? 'ERROR' : 'SUCCESS';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import defaultLine from './line-styles.js';
import tilemapChart from './tilemap-chart.js';
import {
alignMargin,
convertEpochToDateString,
extractSeries,
formatSeries,
makeFormatter,
overrideStyles,
} from './utils.js';
import { initFilters } from './data-filters.js';
import { convertEpochToDateString } from './utils';

accessibility(Highcharts);

Expand Down

0 comments on commit e310b92

Please sign in to comment.