editor: don't try to retrieve props from parents when widget is root
This commit is contained in:
parent
c927ee3af5
commit
8b07976f02
1 changed files with 2 additions and 2 deletions
|
|
@ -67,8 +67,8 @@ function updateWidget(widget, options={}) {
|
|||
widgetManager.removeWidgets(removedWidgets)
|
||||
|
||||
// retreive widget's data from it's parent if possible
|
||||
var parentProps = widget.parent.props[widget.getProp('type') == 'tab' ? 'tabs' : 'widgets'],
|
||||
data = parentProps ? parentProps[index] : widget.props
|
||||
var parentProps = widget.getProp('type') === 'root' ? false : widget.parent.props[widget.getProp('type') == 'tab' ? 'tabs' : 'widgets'],
|
||||
data = parentProps ? parentProps[index] : widget.props
|
||||
|
||||
// create new widget
|
||||
var newWidget = parser.parse({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue