Use value as string, so we don't fail if invalid data is passed

This commit is contained in:
Nathan Gray 2013-06-19 18:06:59 +00:00
parent 625dae0c59
commit 865151f977

View File

@ -51,8 +51,8 @@ var et2_diff = et2_valueWidget.extend([et2_IDetachedDOM],
jQuery(this.div).empty();
if(value['old'] && value['new']) {
// Build diff
var old_text = difflib.stringAsLines(value['old']);
var new_text = difflib.stringAsLines(value['new']);
var old_text = difflib.stringAsLines(value['old'].toString());
var new_text = difflib.stringAsLines(value['new'].toString());
var sm = new difflib.SequenceMatcher(old_text, new_text);
var opcodes = sm.get_opcodes();
var view = diffview.buildView({