Merge pull request #365 from trheyi/main

[fix] widgets hook copy bug
This commit is contained in:
Max 2023-04-12 21:21:11 +08:00 committed by GitHub
commit 95fde2d7a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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
}
}