From 50d3dbe39425485a73bb108f8b3ab0d6120e7759 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 16 Dec 2017 03:40:41 +0300 Subject: [PATCH] expose prefs.defaults --- js/prefs.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/prefs.js b/js/prefs.js index d9f0d3c4..e2ac97eb 100644 --- a/js/prefs.js +++ b/js/prefs.js @@ -105,7 +105,10 @@ var prefs = new function Prefs() { // coalesce multiple pref changes in broadcast let broadcastPrefs = {}; - Object.defineProperty(this, 'readOnlyValues', {value: {}}); + Object.defineProperties(this, { + defaults: {value: deepCopy(defaults)}, + readOnlyValues: {value: {}}, + }); Object.assign(Prefs.prototype, {