You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2017/08/30 20:37:19 UTC
[07/32] git commit: [flex-asjs] [refs/heads/feature/dragAndDrop] -
FLEX-35350 - THead and TBody need to be created a bit early cause MDL
complaining with NPE when dataProvider is null
FLEX-35350 - THead and TBody need to be created a bit early cause MDL complaining with NPE when dataProvider is null
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/d52d531b
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/d52d531b
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/d52d531b
Branch: refs/heads/feature/dragAndDrop
Commit: d52d531b04895d7ecc38167c96a08d9ca9e75594
Parents: 10163b7
Author: piotrz <pi...@apache.org>
Authored: Tue Aug 22 00:23:26 2017 +0200
Committer: piotrz <pi...@apache.org>
Committed: Tue Aug 22 00:23:26 2017 +0200
----------------------------------------------------------------------
.../src/main/flex/org/apache/flex/mdl/Table.as | 26 ++++++++------------
1 file changed, 10 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d52d531b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as
index 2513548..d4a7514 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Table.as
@@ -102,9 +102,6 @@ package org.apache.flex.mdl
{
COMPILE::JS
{
- addTHeadToParent();
- addTBodyToParent();
-
if (_isTheadAddedToParent && _isTbodyAddedToParent)
{
tbody.addElement(c);
@@ -172,12 +169,12 @@ package org.apache.flex.mdl
element = document.createElement('table') as WrappedHTMLElement;
- thead = new THead();
- tbody = new TBody();
-
positioner = element;
element.flexjs_wrapper = this;
+ addTHeadToParent();
+ addTBodyToParent();
+
return element;
}
@@ -242,11 +239,10 @@ package org.apache.flex.mdl
{
if (_isTheadAddedToParent) return;
- if (thead)
- {
- super.addElement(thead);
- _isTheadAddedToParent = true;
- }
+ thead = new THead();
+ super.addElement(thead);
+
+ _isTheadAddedToParent = true;
}
COMPILE::JS
@@ -254,11 +250,9 @@ package org.apache.flex.mdl
{
if (_isTbodyAddedToParent) return;
- if (tbody)
- {
- super.addElement(tbody);
- _isTbodyAddedToParent = true;
- }
+ tbody = new TBody();
+ super.addElement(tbody);
+ _isTbodyAddedToParent = true;
}
}
}