mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-12 06:24:32 +08:00
Make prospective syntax compatible
Summary: Can't run `RNTester` app and got the error below:  Make prospective syntax(trailing commas in function parameter lists and calls, supported in ES8) compatible. If correct, the `RNTester` can be started. Closes https://github.com/facebook/react-native/pull/15510 Differential Revision: D5644673 Pulled By: TheSavior fbshipit-source-id: df34638f37b81f04cea5cf7a25fc7405d4321ea6
This commit is contained in:
committed by
Facebook Github Bot
parent
f69638b56f
commit
9e71b6065f
@@ -28,15 +28,15 @@ function buildRegExps(basePath, dirPaths) {
|
||||
folderPath instanceof RegExp
|
||||
? new RegExp(
|
||||
`^${escapeRegExp(
|
||||
path.resolve(basePath, '.').replace(/\\/g, '/'),
|
||||
path.resolve(basePath, '.').replace(/\\/g, '/')
|
||||
)}/${folderPath.source}`,
|
||||
folderPath.flags,
|
||||
folderPath.flags
|
||||
)
|
||||
: new RegExp(
|
||||
`^${escapeRegExp(
|
||||
path.resolve(basePath, folderPath).replace(/\\/g, '/'),
|
||||
)}`,
|
||||
),
|
||||
path.resolve(basePath, folderPath).replace(/\\/g, '/')
|
||||
)}`
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user