Skip to content
This repository was archived by the owner on Jun 3, 2021. It is now read-only.

Commit d83282f

Browse files
committed
style(core): fix code style
1 parent a59d737 commit d83282f

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

  • packages/@weex/core/src/cli

packages/@weex/core/src/cli/cli.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -537,19 +537,19 @@ export async function getLatestNpmPackageInfo(name: string, registry: string) {
537537
* Pick suitable search from stack
538538
* @param stack error stack
539539
*/
540-
export function pickSearchKey (stack: string) {
541-
let errorIndex = /error:/ig.exec(stack).index
540+
export function pickSearchKey(stack: string) {
541+
let errorIndex = /error:/gi.exec(stack).index
542542
if (errorIndex) {
543543
return stack
544-
.slice(errorIndex + 6)
545-
.split('\n')[0]
546-
.split(' ')
547-
.join('+')
544+
.slice(errorIndex + 6)
545+
.split('\n')[0]
546+
.split(' ')
547+
.join('+')
548548
} else {
549549
return stack
550-
.split('\n')[0]
551-
.split(' ')
552-
.join('+')
550+
.split('\n')[0]
551+
.split(' ')
552+
.join('+')
553553
}
554554
}
555555

0 commit comments

Comments
 (0)