From f8392c89d09ed6c98d38f3ffeb39342742dfe3ad Mon Sep 17 00:00:00 2001 From: Bryce Osterhaus Date: Thu, 21 Sep 2017 09:09:37 -0700 Subject: [PATCH] Fix for https://github.com/metal/metal.js/issues/259 --- packages/metal-state/src/State.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/metal-state/src/State.js b/packages/metal-state/src/State.js index 2ab940e6..70fe0476 100644 --- a/packages/metal-state/src/State.js +++ b/packages/metal-state/src/State.js @@ -1,6 +1,6 @@ 'use strict'; -import { async, getStaticProperty, isDefAndNotNull, isFunction, isObject, isString, object } from 'metal'; +import { async, getStaticProperty, isDef, isDefAndNotNull, isFunction, isObject, isString, object } from 'metal'; import { EventEmitter } from 'metal-events'; /** @@ -553,7 +553,7 @@ class State extends EventEmitter { * @protected */ setInitialValue_(name) { - if (this.hasInitialValue_(name)) { + if (this.hasInitialValue_(name) && isDef(this.initialValues_[name])) { this.set(name, this.initialValues_[name]); this.initialValues_[name] = undefined; }