Commit 0ab7ffe1 authored by DamienMcKenna's avatar DamienMcKenna Committed by Robert Ragas

Issue #2773385 by DamienMcKenna, lodey, MrPaulDriver: Breaks JS scripts on node edit forms

parent e810c5ea
......@@ -151,7 +151,9 @@ YoastSEO_DrupalSource.prototype.parseSnippetData = function(source, target) {
document.getElementById(target).value = (ev.target.value || "");
this.triggerEvent(target);
}.bind(this);
document.getElementById(source).addEventListener("blur", listener);
if (document.getElementById(source) !== null) {
document.getElementById(source).addEventListener('blur', listener);
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment