Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/refresh-config-on-store-switch' …
Browse files Browse the repository at this point in the history
…into integration
  • Loading branch information
jaybeckr committed Jun 1, 2022
2 parents 11cd371 + 50720f6 commit 6d243d5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion view/frontend/web/js/action/checkout-session-config-load.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@ define([
], function ($, _, remoteStorage, url, customerData) {
'use strict';

const storageKey = 'amzn-checkout-session-config';
$('.switcher-option').on('click', function () {
$.localStorage.remove(storageKey);
});

var localStorage = null;
var getLocalStorage = function () {
if (localStorage === null) {
localStorage = $.initNamespaceStorage('amzn-checkout-session-config').localStorage;
localStorage = $.initNamespaceStorage(storageKey).localStorage;
}
return localStorage;
};
Expand Down

0 comments on commit 6d243d5

Please sign in to comment.