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

Commit

Permalink
style(core): fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
erha19 committed Feb 13, 2019
1 parent a59d737 commit d83282f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/@weex/core/src/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,19 +537,19 @@ export async function getLatestNpmPackageInfo(name: string, registry: string) {
* Pick suitable search from stack
* @param stack error stack
*/
export function pickSearchKey (stack: string) {
let errorIndex = /error:/ig.exec(stack).index
export function pickSearchKey(stack: string) {
let errorIndex = /error:/gi.exec(stack).index
if (errorIndex) {
return stack
.slice(errorIndex + 6)
.split('\n')[0]
.split(' ')
.join('+')
.slice(errorIndex + 6)
.split('\n')[0]
.split(' ')
.join('+')
} else {
return stack
.split('\n')[0]
.split(' ')
.join('+')
.split('\n')[0]
.split(' ')
.join('+')
}
}

Expand Down

0 comments on commit d83282f

Please sign in to comment.