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

Commit 8a33a5d

Browse files
committed
Fix the regex based on review comment.
1 parent 4c737e3 commit 8a33a5d

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

src/preferences/PreferencesBase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ define(function (require, exports, module) {
176176
self._lineEndings = FileUtils.sniffLineEndings(text);
177177

178178
// If the file is empty, turn it into an empty object
179-
if (/^\w*$/.test(text)) {
179+
if (/^\s*$/.test(text)) {
180180
result.resolve({});
181181
} else {
182182
try {

test/spec/PreferencesBase-test.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,10 +1217,7 @@ define(function (require, exports, module) {
12171217
runs(function () {
12181218
promise.then(function (data) {
12191219
expect(data).toEqual({});
1220-
})
1221-
.fail(function (error) {
1222-
expect("There should have been no error").toEqual("");
1223-
});
1220+
});
12241221
});
12251222
});
12261223
});

0 commit comments

Comments
 (0)