Skip to content

Commit

Permalink
Fix artalk.js darkmode error (HEIGE-PCloud#1157)
Browse files Browse the repository at this point in the history
  • Loading branch information
kkbt0 authored and Jatin794 committed Dec 19, 2024
1 parent d126e5f commit 246c02b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions assets/js/lib/artalk.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import Artalk from 'artalk'
if (window.config?.comment) {
const config = window.config.comment.artalk
if (config) {
Artalk.init(config)
const artalk = Artalk.init(config)
artalk.setDarkMode(window.isDark)
window._artalkOnSwitchTheme = () => {
Artalk.setDarkMode(window.isDark)
artalk.setDarkMode(window.isDark)
}
window.switchThemeEventSet.add(window._artalkOnSwitchTheme)
}
Expand Down

0 comments on commit 246c02b

Please sign in to comment.