Fix incorrect var usage in replaceWith
Merge pull request #3519 from ghedamat/fix-var-in-replaceWith

Fix incorrect var usage in replaceWith