optimise and fix quote api support for addons

This commit is contained in:
David Ralph
2020-12-05 13:48:14 +00:00
parent 7147dbef30
commit 408f8c4502
5 changed files with 96 additions and 16 deletions

View File

@@ -15,7 +15,7 @@ export default class MarketplaceFunctions {
break;
case 'quote_packs':
localStorage.removeItem('quote_packs');
localStorage.removeItem('quote_api');
localStorage.removeItem('quoteAPI');
break;
default:
try { localStorage.removeItem(type); }
@@ -46,7 +46,7 @@ export default class MarketplaceFunctions {
break;
case 'photo_packs': localStorage.setItem('photo_packs', JSON.stringify(input.photos)); break;
case 'quote_packs':
if (input.quote_api) localStorage.setItem('quote_api', JSON.stringify(input.quote_api));
if (input.quote_api) localStorage.setItem('quoteAPI', JSON.stringify(input.quote_api));
localStorage.setItem('quote_packs', JSON.stringify(input.quotes));
break;
default: break;