Fix crash on API17 and API21-25

This commit is contained in:
Hristo Hristov
2017-12-11 11:08:25 +02:00
parent ac04ede97e
commit 0abfb1493c
3 changed files with 4 additions and 3 deletions

View File

@@ -280,7 +280,6 @@ const customShortHandProperty = new ShorthandProperty<Style, string>({
name: "customShortHand",
cssName: "custom-short-hand",
converter(value: string): [CssProperty<any, any>, any][] {
console.log("Convert: " + value);
const values = value.split(",");
return [
[customCssAProperty, values[0]],

View File

@@ -204,10 +204,11 @@ export function _onFragmentCreateAnimator(entry: ExpandedEntry, fragment: androi
if (!animator && sdkVersion() >= 21) {
const view = fragment.getView();
const parent = view.getParent();
const jsParent = entry.resolvedPage.parent;
const parent = view.getParent() || (jsParent && jsParent.nativeViewProtected);
const animatedEntries = _getAnimatedEntries(entry.frameId);
if (!animatedEntries || !animatedEntries.has(entry)) {
if (!(<any>parent).isLaidOut()) {
if (parent && !(<any>parent).isLaidOut()) {
animator = enter ? entry.defaultEnterAnimator : entry.defaultExitAnimator;
}
}

View File

@@ -185,6 +185,7 @@ function initializeNativeClasses() {
(<any>this.mCurTransaction).commitNowAllowingStateLoss();
} else {
this.mCurTransaction.commitAllowingStateLoss();
this.owner._getFragmentManager().executePendingTransactions();
}
this.mCurTransaction = null;