Call to nonexisting method on Buffer instance

this._currentNode.content is a Buffer object which has no .replace method