Skip to content
Snippets Groups Projects
Commit 29133fb0 authored by HJ's avatar HJ :fire:
Browse files

don't use cache for theme data

parent 786a695e
Branches
No related tags found
No related merge requests found
......@@ -313,7 +313,9 @@ export const generatePreset = (input) => {
}
export const getThemes = () => {
return window.fetch('/static/styles.json')
const cache = 'no-store'
return window.fetch('/static/styles.json', { cache })
.then((data) => data.json())
.then((themes) => {
return Object.entries(themes).map(([k, v]) => {
......@@ -321,7 +323,7 @@ export const getThemes = () => {
if (typeof v === 'object') {
promise = Promise.resolve(v)
} else if (typeof v === 'string') {
promise = window.fetch(v)
promise = window.fetch(v, { cache })
.then((data) => data.json())
.catch((e) => {
console.error(e)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment