diff --git a/lib/CachedSource.js b/lib/CachedSource.js index df02706..08ca510 100644 --- a/lib/CachedSource.js +++ b/lib/CachedSource.js @@ -31,7 +31,7 @@ class CachedSource extends Source { size() { if(typeof this._cachedSize !== "undefined") return this._cachedSize; if(typeof this._cachedSource !== "undefined") { - if(Buffer.from.length === 1) return new Buffer(this.source()).length; + if(Buffer.from.length === 1) return new Buffer(this._cachedSource).length; return this._cachedSize = Buffer.byteLength(this._cachedSource); } return this._cachedSize = this._source.size();