summaryrefslogtreecommitdiffstats
path: root/lib/models
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-04-29 17:34:33 +0200
committerSamy Pessé <samypesse@gmail.com>2016-04-29 17:34:33 +0200
commita5eec818197b434506da5d6fa61b37d21c4709f4 (patch)
tree78e671d396bb9e54a32ac170573b8a83994f773f /lib/models
parent98f70879bde88d32e898ff057f4dc7ceaff7e25e (diff)
downloadgitbook-a5eec818197b434506da5d6fa61b37d21c4709f4.zip
gitbook-a5eec818197b434506da5d6fa61b37d21c4709f4.tar.gz
gitbook-a5eec818197b434506da5d6fa61b37d21c4709f4.tar.bz2
Fix context for page template
Diffstat (limited to 'lib/models')
-rw-r--r--lib/models/config.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/models/config.js b/lib/models/config.js
index 547007a..663f4aa 100644
--- a/lib/models/config.js
+++ b/lib/models/config.js
@@ -31,7 +31,13 @@ Config.prototype.getValue = function(keyPath, def) {
return def;
}
- return values.getIn(keyPath);
+ var value = values.getIn(keyPath);
+
+ if (Immutable.Iterable.isIterable(value)) {
+ value = value.toJS();
+ }
+
+ return value
};
/**