diff options
Diffstat (limited to 'vendor/github.com/xeipuuv/gojsonschema/schemaReferencePool.go')
-rw-r--r-- | vendor/github.com/xeipuuv/gojsonschema/schemaReferencePool.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/github.com/xeipuuv/gojsonschema/schemaReferencePool.go b/vendor/github.com/xeipuuv/gojsonschema/schemaReferencePool.go index 294e36a73..6e5e1b5cd 100644 --- a/vendor/github.com/xeipuuv/gojsonschema/schemaReferencePool.go +++ b/vendor/github.com/xeipuuv/gojsonschema/schemaReferencePool.go @@ -62,6 +62,7 @@ func (p *schemaReferencePool) Add(ref string, sch *subSchema) { if internalLogEnabled { internalLog(fmt.Sprintf("Add Schema Reference %s to pool", ref)) } - - p.documents[ref] = sch + if _, ok := p.documents[ref]; !ok { + p.documents[ref] = sch + } } |