Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/uni-components/lib/ad/ad.mixin.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export default {
},

_isMobile () {
return /android|iphone/i.test(navigator.userAgent.toLowerCase())
return /android|phone/i.test(navigator.userAgent.toLowerCase())
Copy link

Copilot AI Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The call to toLowerCase() is redundant because the regex already uses the case-insensitive flag 'i'. Consider removing .toLowerCase() to simplify the code.

Suggested change
return /android|phone/i.test(navigator.userAgent.toLowerCase())
return /android|phone/i.test(navigator.userAgent)

Copilot uses AI. Check for mistakes.

},

_onmpload (e) {
Expand Down
Loading