[fix] widgets hook copy bug

This commit is contained in:
Max 2023-04-12 21:19:59 +08:00
parent d8d14f1994
commit 34febd070e
2 changed files with 3 additions and 2 deletions

View file

@ -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"

View file

@ -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
}
}