Skip to content

Commit

Permalink
Merge pull request #1639 from mozilla/fix-breaches-page
Browse files Browse the repository at this point in the history
Fix breaches page
  • Loading branch information
groovecoder committed Apr 13, 2020
2 parents 168a172 + 6d10b7e commit 1a24f5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion template-helpers/breaches.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ function getLocalizedBreachValues(locales, breach) {
return breach;
}

function getBreachArray(breaches, args) {
function getBreachArray(args) {
const locales = args.data.root.req.supportedLocales;

let breaches = args.data.root.req.app.locals.breaches;
breaches = JSON.parse(JSON.stringify(breaches));
// should we consider filtering the breaches when the app loads
// since we aren't ever showing them now anyway?
Expand Down
2 changes: 1 addition & 1 deletion views/partials/top-level/all-breaches.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
</section>
</div>

<div id="breach-array-json" hidden=true data-breach-array="{{ getBreachArray req.app.locals.breaches }}"></div>
<div id="breach-array-json" hidden=true data-breach-array="{{ getBreachArray }}"></div>

0 comments on commit 1a24f5b

Please sign in to comment.