fix snapshot mismatch message for file

This commit is contained in:
Henry Jameson 2020-01-23 22:04:05 +02:00
parent 64fc07f080
commit a69723badf

View file

@ -385,7 +385,7 @@ export default {
if (!source && !theme) { if (!source && !theme) {
throw new Error('Can\'t load theme: empty') throw new Error('Can\'t load theme: empty')
} }
const version = (origin === 'localstorage' && !theme.colors) const version = (origin === 'localStorage' && !theme.colors)
? 'l1' ? 'l1'
: fileVersion : fileVersion
const snapshotEngineVersion = (theme || {}).themeEngineVersion const snapshotEngineVersion = (theme || {}).themeEngineVersion
@ -404,7 +404,7 @@ export default {
version !== 'l1' && version !== 'l1' &&
origin !== 'defaults' origin !== 'defaults'
) { ) {
if (sourceSnapshotMismatch) { if (sourceSnapshotMismatch && origin === 'localStorage') {
this.themeWarning = { this.themeWarning = {
origin, origin,
themeEngineVersion, themeEngineVersion,