Browse Source

Check if the attribute is a string before replacing

pull/947/head
Artur Arseniev 9 years ago
parent
commit
b20dd6f4b3
  1. 3
      src/dom_components/model/Component.js

3
src/dom_components/model/Component.js

@ -670,7 +670,8 @@ const Component = Backbone.Model.extend(Styleable).extend(
const attributes = this.getAttrToHTML();
for (let attr in attributes) {
const value = attributes[attr].replace(/"/g, '"');
const val = attributes[attr];
const value = isString(val) ? val.replace(/"/g, '"') : val;
if (!isUndefined(value)) {
attrs.push(`${attr}="${value}"`);

Loading…
Cancel
Save