Browse Source

Fix cloning of attribute in `clone` method

pull/712/head
Artur Arseniev 9 years ago
parent
commit
0dbb420969
  1. 7
      dist/grapes.js
  2. 6
      dist/grapes.min.js
  3. 2
      package-lock.json
  4. 2
      package.json
  5. 3
      src/dom_components/model/Component.js

7
dist/grapes.js

@ -4627,7 +4627,8 @@ module.exports = Backbone.Model.extend(_Styleable2.default).extend({
clone: function clone(reset) {
var em = this.em;
var style = this.getStyle();
var attr = (0, _underscore.clone)(this.attributes);
var attr = _extends({}, this.attributes);
attr.attributes = _extends({}, attr.attributes);
delete attr.attributes.id;
attr.components = [];
attr.classes = [];
@ -23211,7 +23212,7 @@ module.exports = function () {
plugins: plugins,
// Will be replaced on build
version: '0.12.55',
version: '0.12.56',
/**
* Initializes an editor based on passed options
@ -35878,7 +35879,7 @@ module.exports = function () {
if (customRte) {
customRte.disable(el, rte);
} else {
rte.disable();
rte && rte.disable();
}
hideToolbar();

6
dist/grapes.min.js

File diff suppressed because one or more lines are too long

2
package-lock.json

@ -1,6 +1,6 @@
{
"name": "grapesjs",
"version": "0.12.55",
"version": "0.12.56",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

2
package.json

@ -1,7 +1,7 @@
{
"name": "grapesjs",
"description": "Free and Open Source Web Builder Framework",
"version": "0.12.55",
"version": "0.12.56",
"author": "Artur Arseniev",
"license": "BSD-3-Clause",
"homepage": "http://grapesjs.com",

3
src/dom_components/model/Component.js

@ -562,7 +562,8 @@ module.exports = Backbone.Model.extend(Styleable).extend({
clone(reset) {
const em = this.em;
const style = this.getStyle();
const attr = clone(this.attributes);
const attr = { ...this.attributes };
attr.attributes = { ...attr.attributes };
delete attr.attributes.id;
attr.components = [];
attr.classes = [];

Loading…
Cancel
Save