From b1365f9669dda18daaee003a44ad4c9348f55d26 Mon Sep 17 00:00:00 2001 From: Zhongyi Tong Date: Wed, 5 Jul 2017 18:58:25 +0800 Subject: [PATCH] Fix defaultValue not set on the first time. --- app/renderer/js/utils/config-util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/renderer/js/utils/config-util.js b/app/renderer/js/utils/config-util.js index 5c7c9fa2..ce471cc0 100644 --- a/app/renderer/js/utils/config-util.js +++ b/app/renderer/js/utils/config-util.js @@ -28,7 +28,7 @@ class ConfigUtil { getConfigItem(key, defaultValue = null) { const value = this.db.getData('/')[key]; if (value === undefined) { - this.setConfigItem(key, value); + this.setConfigItem(key, defaultValue); return defaultValue; } else { return value;