Browse Source

Check id in attributes before remove

pull/3281/head
Artur Arseniev 5 years ago
parent
commit
d8ba7ab51f
  1. 1
      src/code_manager/model/HtmlGenerator.js

1
src/code_manager/model/HtmlGenerator.js

@ -24,6 +24,7 @@ export default Backbone.Model.extend({
id &&
id[0] === 'i' && // all autogenerated IDs start with 'i'
!mod.get('script') && // if the component has script, we have to leave the ID
!mod.get('attributes').id && // id is not intentionally in attributes
idRules.indexOf(id) < 0 // we shouldn't have any rule with this ID
) {
delete attrs.id;

Loading…
Cancel
Save