Skip to content

Vue causes browser to become unresponsive when createElement is called with Promise-returning function #6558

@DanielRosenwasser

Description

@DanielRosenwasser

Version

2.4.2

Reproduction link

https://jsfiddle.net/2pbthd1v/

Steps to reproduce

When calling createElement, pass a function that returns a promise which resolves to a Vue options bag.

For example:

<div id="app">
  <p>{{ message }}</p>
</div>
var options = {
  template: '<div id="replacement">Hello!!</div>',
}

new Vue({
  el: "#app",
  render(h) {
    return h(() => new Promise(r => r(options)));
  }
});

What is expected?

Either something useful or an error message.

What is actually happening?

The entire page stops responding.


This was part of the .d.ts test suite. I wanted to see if a test case was legitimate, but I ended up finding that it triggers some sort of bad behavior.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy