]> git.nbdom.net Git - nb.git/commitdiff
lib/lua/nb.lua
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 16 May 2018 11:45:10 +0000 (12:45 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 16 May 2018 11:45:10 +0000 (12:45 +0100)
lib/lua/nb.lua

index a046e23d0229c5479678ea46a02f30089b3e06ef..4c463b043e1e6f964e4740c1329bb615baba5a7c 100644 (file)
@@ -35,6 +35,7 @@ function nb:ngx_location_md(fheader,ffooter)
 
        local file = ngx.var.document_root .. ngx.var.uri;
        local content = self:readall(file)
+       if not content then return end
 
        local vars = {}
        -- Extract title from h1