mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🐛 Fix NPE https://ld246.com/article/1739550445065
This commit is contained in:
parent
c3bc804fce
commit
4374859e04
2 changed files with 12 additions and 5 deletions
|
|
@ -691,7 +691,15 @@ func Close(force, setCurrentWorkspace bool, execInstallPkg int) (exitCode int) {
|
|||
return
|
||||
}
|
||||
|
||||
var CustomEmojis = sync.Map{}
|
||||
var customEmojis = sync.Map{}
|
||||
|
||||
func AddCustomEmoji(emojiName, imgSrc string) {
|
||||
customEmojis.Store(emojiName, imgSrc)
|
||||
}
|
||||
|
||||
func ClearCustomEmojis() {
|
||||
customEmojis.Clear()
|
||||
}
|
||||
|
||||
func NewLute() (ret *lute.Lute) {
|
||||
ret = util.NewLute()
|
||||
|
|
@ -701,7 +709,7 @@ func NewLute() (ret *lute.Lute) {
|
|||
ret.SetSpellcheck(Conf.Editor.Spellcheck)
|
||||
|
||||
customEmojiMap := map[string]string{}
|
||||
CustomEmojis.Range(func(key, value interface{}) bool {
|
||||
customEmojis.Range(func(key, value interface{}) bool {
|
||||
customEmojiMap[key.(string)] = value.(string)
|
||||
return true
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue