You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When one of the two values are empty, the diff is not shown in case of originalContent and changedContent are passed as parameters.
Example (pass an empty originalContent):
$("input[type=button2]").click(function () {
$("#wrapper tr").prettyTextDiff({
cleanup: $("#cleanup").is(":checked"),
originalContent: "",
changedContent: "Some more text which can be passed to this function.",
diffContainer: ".diff2"
});
});
A quick fix I found to let it work is to split the if (settings.originalContent && settings.changedContent) {} in two separate checks:
if (settings.originalContent) {
original = $('
').html(settings.originalContent).text();
} else {
original = $(settings.originalContainer, this).text();
}
if (settings.changedContent) {
changed = $('
When one of the two values are empty, the diff is not shown in case of originalContent and changedContent are passed as parameters.
Example (pass an empty originalContent):
$("input[type=button2]").click(function () {
$("#wrapper tr").prettyTextDiff({
cleanup: $("#cleanup").is(":checked"),
originalContent: "",
changedContent: "Some more text which can be passed to this function.",
diffContainer: ".diff2"
});
});
A quick fix I found to let it work is to split the if (settings.originalContent && settings.changedContent) {} in two separate checks:
if (settings.originalContent) {
original = $('
} else {
original = $(settings.originalContainer, this).text();
}
if (settings.changedContent) {
changed = $('
} else {
changed = $(settings.changedContainer, this).text();
}
The text was updated successfully, but these errors were encountered: