fix: ComputeAssetHashes 并发安全 + theme 页重复加载 JS 导致双写 panic
Some checks failed
CI / Lint + Build (push) Has been cancelled
Some checks failed
CI / Lint + Build (push) Has been cancelled
- helper.go: 用 sync.RWMutex 保护 assetHashes,构建本地 map 后原子替换 - theme.html: 删除硬编码 script 标签(footer ExtraJS 已加载), 修复 site-settings-theme.js 执行两次 → applyTheme 触发两次 → 并发写 map panic
This commit is contained in:
@ -41,4 +41,3 @@
|
||||
</div>
|
||||
</div>
|
||||
{{template "admin/layout/footer.html" .}}
|
||||
<script src="/admin/static/js/site-settings-theme.js?v={{assetV "/admin/static/js/site-settings-theme.js"}}" nonce="{{.CSPNonce}}"></script>
|
||||
|
||||
Reference in New Issue
Block a user