diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-04-29 17:34:33 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-04-29 17:34:33 +0200 |
commit | a5eec818197b434506da5d6fa61b37d21c4709f4 (patch) | |
tree | 78e671d396bb9e54a32ac170573b8a83994f773f /lib/models | |
parent | 98f70879bde88d32e898ff057f4dc7ceaff7e25e (diff) | |
download | gitbook-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.js | 8 |
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 }; /** |