mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-27 23:03:37 -05:00
add nil check
This commit is contained in:
parent
425f61142f
commit
3a969bc075
1 changed files with 1 additions and 1 deletions
|
@ -247,7 +247,7 @@ func (p *parser) doImport() error {
|
||||||
var importedTokens []Token
|
var importedTokens []Token
|
||||||
|
|
||||||
// first check macros. That is a simple, non-recursive replacement
|
// 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]
|
importedTokens = p.definedMacros[importPattern]
|
||||||
} else {
|
} else {
|
||||||
// make path relative to Caddyfile rather than current working directory (issue #867)
|
// make path relative to Caddyfile rather than current working directory (issue #867)
|
||||||
|
|
Loading…
Add table
Reference in a new issue