Skip to content

Commit

Permalink
add nil check
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Peterson committed Oct 13, 2017
1 parent 425f611 commit 3a969bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion caddyfile/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func (p *parser) doImport() error {
var importedTokens []Token

// first check macros. That is a simple, non-recursive replacement
if p.definedMacros[importPattern] != nil {
if p.definedMacros != nil && p.definedMacros[importPattern] != nil {
importedTokens = p.definedMacros[importPattern]
} else {
// make path relative to Caddyfile rather than current working directory (issue #867)
Expand Down

0 comments on commit 3a969bc

Please sign in to comment.