fix: clear config only when axis changed

This commit is contained in:
1ambda 2017-04-11 14:26:30 +09:00
parent 5464e847a1
commit 6a2130af1e

View file

@ -294,7 +294,8 @@ export function initializeConfig(config, spec) {
config.chartChanged = true
config.parameterChanged = false
const currentVersion = JSON.stringify(spec)
// if spex.axis is changed, then need to clear persisted axis
const currentVersion = JSON.stringify(spec.axis)
if (!config.spec || !config.spec.version || config.spec.version !== currentVersion) {
spec.version = currentVersion
spec.initialized = true