File tree Expand file tree Collapse file tree
app/service/service_worker Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ export default class ServiceWorkerManager {
116116 . then ( ( resp : { data : { [ key : string ] : any ; notice : string ; version : string } } ) => {
117117 const data = resp . data ;
118118 systemConfig
119- . getCheckUpdate ( { sanitizeHTML } )
119+ . getCheckUpdate ( )
120120 . then ( ( items ) => {
121121 const isRead = items . notice !== data . notice ? false : items . isRead ;
122122 systemConfig . setCheckUpdate ( { ...data , isRead : isRead } ) ;
Original file line number Diff line number Diff line change @@ -271,9 +271,12 @@ function App() {
271271 const checkScriptEnableAndUpdate = async ( ) => {
272272 const [ isEnableScript , checkUpdate ] = await Promise . all ( [
273273 systemConfig . getEnableScript ( ) ,
274- systemConfig . getCheckUpdate ( { sanitizeHTML } ) ,
274+ systemConfig . getCheckUpdate ( ) ,
275275 ] ) ;
276276 if ( ! hookMgr . isMounted ) return ;
277+ if ( typeof checkUpdate . notice === "string" ) {
278+ checkUpdate . notice = sanitizeHTML ( checkUpdate . notice ) ;
279+ }
277280 setIsEnableScript ( isEnableScript ) ;
278281 setCheckUpdate ( checkUpdate ) ;
279282 } ;
You can’t perform that action at this time.
0 commit comments