mirror of
https://github.com/yusing/godoxy.git
synced 2026-02-25 20:04:55 +01:00
fixed nil dereferencing
This commit is contained in:
2
frontend
2
frontend
Submodule frontend updated: d0e59630d6...441fd708db
@@ -60,10 +60,12 @@ func (b Builder) Build() NestedError {
|
||||
}
|
||||
|
||||
func (b Builder) To(ptr *NestedError) {
|
||||
if *ptr == nil {
|
||||
if ptr == nil {
|
||||
return
|
||||
} else if *ptr == nil {
|
||||
*ptr = b.Build()
|
||||
} else {
|
||||
**ptr = *b.Build()
|
||||
(*ptr).With(b.Build())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user