mirror of
https://github.com/remy/inliner.git
synced 2024-09-11 17:25:30 +03:00
fixed cache on inliner when used as a module
This commit is contained in:
parent
68a0bc8e88
commit
291182beec
@ -38,6 +38,9 @@ function removeComments(element) {
|
||||
function Inliner(url, options, callback) {
|
||||
var root = url,
|
||||
inliner = this;
|
||||
|
||||
this.requestCache = {};
|
||||
this.requestCachePending = {};
|
||||
|
||||
// inherit EventEmitter so that we can send events with progress
|
||||
events.EventEmitter.call(this);
|
||||
@ -281,9 +284,6 @@ util.inherits(Inliner, events.EventEmitter);
|
||||
|
||||
Inliner.prototype.version = JSON.parse(require('fs').readFileSync(__dirname + '/package.json').toString()).version;
|
||||
|
||||
Inliner.prototype.requestCache = {};
|
||||
Inliner.prototype.requestCachePending = {};
|
||||
|
||||
Inliner.prototype.get = function (url, options, callback) {
|
||||
// support no options being passed in
|
||||
if (typeof options == 'function') {
|
||||
|
Loading…
Reference in New Issue
Block a user