From 34d13662dd5faaa93f3f96d99d98bd0e174f2642 Mon Sep 17 00:00:00 2001 From: Bill Long Date: Fri, 17 Apr 2015 00:50:52 -0500 Subject: [PATCH] Compare against undefined not empty string --- angular-rich-text-diff.js | 2 +- angular-rich-text-diff.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/angular-rich-text-diff.js b/angular-rich-text-diff.js index a401f54..467c127 100644 --- a/angular-rich-text-diff.js +++ b/angular-rich-text-diff.js @@ -113,7 +113,7 @@ var AngularRichTextDiff; continue; } var tagString = this.tagMap[diffableString[x]]; - if (tagString === '') { + if (tagString === undefined) { // We somehow have a character that is above our range but didn't map // Do we need to add an upper bound or change the range? htmlString += diffableString[x]; diff --git a/angular-rich-text-diff.ts b/angular-rich-text-diff.ts index 6bfc085..22d47e5 100644 --- a/angular-rich-text-diff.ts +++ b/angular-rich-text-diff.ts @@ -137,7 +137,7 @@ module AngularRichTextDiff { } var tagString = this.tagMap[diffableString[x]]; - if (tagString === '') { + if (tagString === undefined) { // We somehow have a character that is above our range but didn't map // Do we need to add an upper bound or change the range? htmlString += diffableString[x];