Skip to content

Commit 673924e

Browse files
committed
Change to use a string for encoding parameter, for backwards compatibility with node 0.8
1 parent 8e27980 commit 673924e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rewriter/rewriter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function processDir(dir) {
4747
}
4848

4949
function processFile(filename) {
50-
var contents = fs.readFileSync(filename, {encoding: 'utf-8'});
50+
var contents = fs.readFileSync(filename, 'utf8');
5151
var rewrittenFile = URI.withinString(contents, function(url) {
5252
var uri = new URI(url);
5353
if (uri.protocol() != 'http') return url;
@@ -74,7 +74,7 @@ function processFile(filename) {
7474
}
7575

7676
function loadRuleSets() {
77-
var fileContents = fs.readFileSync(path.join(__dirname, '../pkg/crx/rules/default.rulesets'), {encoding: 'utf-8'});
77+
var fileContents = fs.readFileSync(path.join(__dirname, '../pkg/crx/rules/default.rulesets'), 'utf-8');
7878
var xml = new DOMParser().parseFromString(fileContents, 'text/xml');
7979
ruleSets = new rules.RuleSets("fake user agent", lrucache.LRUCache, xml, {});
8080
}

0 commit comments

Comments
 (0)