Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Modal - componentOnReady error #592

Open
ionitron-bot bot opened this issue Nov 29, 2018 · 0 comments
Open

Modal - componentOnReady error #592

ionitron-bot bot opened this issue Nov 29, 2018 · 0 comments
Labels

Comments

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 29, 2018

Original issue by @cjorasch on 2018-03-06T22:45:36Z

Ionic version: (check one with "x")
(For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[ ] 3.x
x ] 4.x

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request

Please do not submit support requests or "How to" questions here. Instead, please use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
There is an error when attempting to open a modal using <ion-modal-controller>.create.

chunk25.js:18 Uncaught (in promise) TypeError: element.componentOnReady is not a function
    at createOverlay (chunk25.js:18)
    at ModalController.create (ion-modal-controller.js:23)
    at ensureComponent.then.el (chunk17.js:145)
    at <anonymous>

The following function generates the error:

function createOverlay(tagName, opts) {
    // create ionic's wrapping ion-alert component
    const element = document.createElement(tagName);
    // give this alert a unique id
    element.overlayId = lastId++;
    // convert the passed in overlay options into props
    // that get passed down into the new alert
    Object.assign(element, opts);
    // append the alert element to the document body
    const appRoot = document.querySelector('ion-app') || document.body;
    appRoot.appendChild(element);
    return element.componentOnReady();
}

Version information:

    "@ionic/core": "0.1.3",
    "@stencil/core": "0.6.18",
    "@stencil/router": "0.0.27",
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

0 participants