Skip to content

Commit

Permalink
fix reading strings from an existing user.js
Browse files Browse the repository at this point in the history
  • Loading branch information
hbenl committed Feb 22, 2020
1 parent 397764d commit 2e3f4fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/firefox_profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ FirefoxProfile.prototype._writeUserPrefs = function(userPrefs) {

FirefoxProfile.prototype._readExistingUserjs = function() {
var self = this,
regExp = /user_pref\(['"](.*)["'],\s*['"]?(.*)["']?\)/,
regExp = /user_pref\(['"](.*)["'],\s*(.*)\)/,
contentLines = fs.readFileSync(this.userPrefs, "utf8").split('\n');
contentLines.forEach(function(line) {
var found = line.match(regExp);
Expand Down

0 comments on commit 2e3f4fc

Please sign in to comment.