mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
deep clone instead of shallow to prevent watchers from executing prematurely
This commit is contained in:
@@ -3,6 +3,8 @@ import DropGrid from '../Drop/Grid.js'
|
||||
import DashboardItem from "./Item.js";
|
||||
import WidgetIcon from "./Widget/WidgetIcon.js"
|
||||
|
||||
import ObjectUtils from "../../helpers/ObjectUtils.js";
|
||||
|
||||
export default {
|
||||
name: 'Section',
|
||||
components: {
|
||||
@@ -144,7 +146,7 @@ export default {
|
||||
let result = {};
|
||||
updated.forEach(update => {
|
||||
|
||||
let item = {...update.item};
|
||||
let item = structuredClone(ObjectUtils.deepToRaw(update.item));
|
||||
if (!item.placeholder) {
|
||||
if (!item.place[this.gridWidth])
|
||||
item.place[this.gridWidth] = {x: 0, y: 0, w: 1, h: 1};
|
||||
|
||||
Reference in New Issue
Block a user