Skip to content

Commit 98e5598

Browse files
author
Mihail Slavchev
committed
use local variable for regex'
1 parent 906aa01 commit 98e5598

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/services/android-project-service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,9 @@ class AndroidProjectService implements IPlatformProjectService {
177177

178178
var lines = this.$fs.readText(projProp, "utf-8").wait().split(os.EOL);
179179

180+
var regEx = /android\.library\.reference\.(\d+)=(.*)/;
180181
lines.forEach((elem, idx, arr) => {
181-
var match = elem.match(/android\.library\.reference\.(\d+)=(.*)/);
182+
var match = elem.match(regEx);
182183
if (match) {
183184
var libRef: ILibRef = { idx: parseInt(match[1]), path: match[2].trim() };
184185
libRef.adjustedPath = this.$fs.isRelativePath(libRef.path) ? path.join(projDir, libRef.path) : libRef.path;

0 commit comments

Comments
 (0)