File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
mpp-core/src/wasmJsMain/kotlin/cc/unitmesh/agent Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -43,17 +43,9 @@ actual object Platform {
4343 }
4444
4545 actual fun prefersReducedMotion (): Boolean {
46- // WASM runs in browser, check prefers-reduced-motion media query
47- return try {
48- val isBrowser = js(" typeof window !== 'undefined'" ) as Boolean
49- if (isBrowser) {
50- val matches = js(" window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches" ) as Boolean
51- matches
52- } else {
53- false
54- }
55- } catch (e: Exception ) {
56- false
57- }
46+ // WASM runs in browser, default to false
47+ // Full media query check is limited in WASM due to js() expression restrictions
48+ // This can be enhanced in the future if needed
49+ return false
5850 }
5951}
You can’t perform that action at this time.
0 commit comments