[fix] widgets hook copy bug
This commit is contained in:
parent
d8d14f1994
commit
34febd070e
2 changed files with 3 additions and 2 deletions
|
|
@ -36,6 +36,7 @@ import (
|
|||
func Load(cfg config.Config) (err error) {
|
||||
|
||||
defer func() { err = exception.Catch(recover()) }()
|
||||
exception.Mode = cfg.Mode
|
||||
|
||||
// SET XGEN_BASE
|
||||
adminRoot := "yao"
|
||||
|
|
|
|||
|
|
@ -8,14 +8,14 @@ import (
|
|||
|
||||
// CopyBefore copy a before hook
|
||||
func CopyBefore(hook *Before, new *Before) {
|
||||
if hook != nil {
|
||||
if hook != nil && new != nil {
|
||||
*hook = *new
|
||||
}
|
||||
}
|
||||
|
||||
// CopyAfter copy a after hook
|
||||
func CopyAfter(hook *After, new *After) {
|
||||
if hook != nil {
|
||||
if hook != nil && new != nil {
|
||||
*hook = *new
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue