Skip to content

Commit 9dd1646

Browse files
committed
source maps fix
1 parent f1023e9 commit 9dd1646

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/support/sourceMapPath.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ var path = require('path')
44
var crypto = require('crypto')
55

66
var TMPDIR = path.join(os.tmpdir(), 'react-native-refreshable-listview-jest')
7-
if (!fs.existsSync(TMPDIR)) fs.mkdirSync(TMPDIR)
7+
try {
8+
fs.mkdirSync(TMPDIR)
9+
} catch (err) {
10+
if (err.code != 'EEXIST') console.error(err)
11+
}
812

913
function sourceMapPath(srcpath) {
1014
return path.join(TMPDIR, crypto.createHash('md5').update(srcpath).digest('hex') + '.map')

0 commit comments

Comments
 (0)