diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-02-26 09:25:11 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-02-26 09:25:11 +0100 |
commit | 43c5f8d340e0188e6520afd26863f36b3ee2f6b9 (patch) | |
tree | 8067b4003b9a62f83ecfd276f6c584092edc896d | |
parent | b344d6530297e79019629ba132ad08380c554da9 (diff) | |
download | gitbook-43c5f8d340e0188e6520afd26863f36b3ee2f6b9.zip gitbook-43c5f8d340e0188e6520afd26863f36b3ee2f6b9.tar.gz gitbook-43c5f8d340e0188e6520afd26863f36b3ee2f6b9.tar.bz2 |
Don't add glossary to context when non existant
-rw-r--r-- | lib/backbone/glossary.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/backbone/glossary.js b/lib/backbone/glossary.js index 45848e0..cc0fdce 100644 --- a/lib/backbone/glossary.js +++ b/lib/backbone/glossary.js @@ -46,6 +46,8 @@ Glossary.prototype.type = 'glossary'; // Get templating context Glossary.prototype.getContext = function() { + if (!this.path) return {}; + return { glossary: { path: this.path |