chinchang / chinchang/web-maker

Bug: DataCloneError: The object could not be cloned.

Open
#411 4 comments 0 reactions 1 assignee Claimed by @chinchang View on GitHub
bug
Dominant language
JavaScript
Stars
2.7k
Forks
323
PR merge metrics
No merged PRs in 30d

Description

## Meta info

- Is this a bug or suggestion?: Bug
- Version (click on help icon in footer): 4.0.3
- Context - Web app, Chrome extension or both?: Firefox 70.0.0.1

Hi,

I have problem with promises not being able to access variable declared outisde.

I always have this warning :

DataCloneError: The object could not be cloned.

I can tweak my code form place to place but on some case it is really problematic, especially cause it beaks the script (the variables values are not pass where the error occurs). Also, the bug doesn't occur when the web page is exported and loaded in any browser, so it is just a bug in this editor.

Can you please help ?

Here is a code snippet for Firefox DOC for promises ( https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Promise ):

```js
var promise1 = new Promise(function(resolve, reject) {
setTimeout(function() {
resolve('foo');
}, 300);
});

promise1.then(function(value) {
console.log(value);
// expected output: "foo"
});

console.log(promise1);
```

This code snippet trigger the error I mentionned.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.