Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

fix simple verification to regex.search #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
4 changes: 2 additions & 2 deletions weditor/static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -945,15 +945,15 @@ window.vm = new Vue({
const m = this.deviceId.match(/^([^:]+):(.*)/)
const deviceUrl = m[2]
let codeLines;
if (m[1] == "ios") {
if (m[1].search(/ios/i) != -1) {
codeLines = [
"print('Set environment for iOS device\\nInit c = d = wda.Client()')",
"import os",
"import wda",
`os.environ['DEVICE_URL'] = "${deviceUrl}"`,
`c = d = wda.Client()`,
]
} else if (m[1] == "android") {
} else if (m[1].search(/android/i) != -1) {
codeLines = [
"print('Set environment and prepare d = u2.connect()')",
"import os",
Expand Down