Commit aad35c39 authored by AlexKirienko's avatar AlexKirienko Committed by Robert Ragas

Issue #2633280 by AlexKirienko: JS error when Title is readonly

parent cd90fde8
...@@ -308,7 +308,7 @@ YoastSEO_DrupalSource.prototype.bindElementEvents = function() { ...@@ -308,7 +308,7 @@ YoastSEO_DrupalSource.prototype.bindElementEvents = function() {
*/ */
YoastSEO_DrupalSource.prototype.inputElementEventBinder = function() { YoastSEO_DrupalSource.prototype.inputElementEventBinder = function() {
for (field in this.config.fields) { for (field in this.config.fields) {
if (typeof this.config.fields[field] != 'undefined') { if (typeof this.config.fields[field] != 'undefined' && document.getElementById(this.config.fields[field])) {
document.getElementById(this.config.fields[field]).__refObj = this; document.getElementById(this.config.fields[field]).__refObj = this;
document.getElementById(this.config.fields[field]).addEventListener("input", this.renewData.bind(this)); document.getElementById(this.config.fields[field]).addEventListener("input", this.renewData.bind(this));
} }
......
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