Commit f2bfbfe0 by Edgar Hipp

when imagename undefined, return without throwing

parent 2d15eb98
......@@ -29,7 +29,7 @@ class ImageModule
tag = templaterState.textInsideTag.substr(1)
imgName=scopeManager.getValueFromScope(tag)
if imgName=='undefined' then throw new Error "imageName is undefined for:#{tag}"
if imgName=='undefined' then return
try
imgData=fs.readFileSync(imgName)
catch e
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment