From f4c5b2a99646f9310c0b496d69907ceadb74b72f Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 13 Apr 2016 14:51:15 +0200 Subject: [PATCH] Add sane defaults to TextPatcher diffs --- www/common/TextPatcher.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/TextPatcher.js b/www/common/TextPatcher.js index ee9c6fb61..98ccea65a 100644 --- a/www/common/TextPatcher.js +++ b/www/common/TextPatcher.js @@ -23,8 +23,8 @@ var diff = function (oldval, newval) { commonEnd++; } - var toRemove; - var toInsert; + var toRemove = 0; + var toInsert = ''; /* throw some assertions in here before dropping patches into the realtime */ if (oldval.length !== commonStart + commonEnd) {