diff options
Diffstat (limited to 'frontend/views/page/components')
| -rw-r--r-- | frontend/views/page/components/page.editor.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/frontend/views/page/components/page.editor.js b/frontend/views/page/components/page.editor.js index a806dc0..38f74ea 100644 --- a/frontend/views/page/components/page.editor.js +++ b/frontend/views/page/components/page.editor.js @@ -120,6 +120,7 @@ class PageEditor extends Component { handleMouseUp(e) { // const { actions } = this.props + const { temporaryTile } = this.props const { dragging, draggingBox, bounds, box, tile } = this.state if (!dragging && !draggingBox) return e.preventDefault() @@ -145,9 +146,10 @@ class PageEditor extends Component { y: tile.settings.y + dy, } } - if (tile.id === 'new') { + if (temporaryTile && tile.id === temporaryTile.id) { this.props.tileActions.updateTemporaryTile(updatedTile) - } else { + } + if (tile.id !== 'new') { this.props.pageActions.updatePageTile(updatedTile) actions.tile.update(updatedTile) } |
