fix(react): handle undefined attributes better, fixes #19563, #19580 (#19588)

This commit is contained in:
Ely Lucas
2019-10-09 10:36:25 -06:00
committed by GitHub
parent 7ce916cc7c
commit 033abe994b
10 changed files with 22 additions and 37 deletions

View File

@ -1,7 +1,7 @@
import { OverlayEventDetail } from '@ionic/core';
import React from 'react';
import { attachEventProps } from './utils';
import { attachProps } from './utils';
interface OverlayBase extends HTMLElement {
present: () => Promise<void>;
@ -57,7 +57,7 @@ export const createControllerComponent = <OptionsType extends object, OverlayTyp
const overlay = this.overlay = await controller.create({
...cProps as any
});
attachEventProps(overlay, {
attachProps(overlay, {
[dismissEventName]: onDidDismiss
}, prevProps);
await overlay.present();