fixes #134
This commit is contained in:
parent
d8ad4849e4
commit
37bb45cc37
2 changed files with 4 additions and 2 deletions
|
@ -27,6 +27,7 @@ class Console extends React.Component {
|
|||
if (nextProps.isPlaying && !this.props.isPlaying) {
|
||||
this.children = [];
|
||||
} else if (nextProps.consoleEvent !== this.props.consoleEvent && this.props.isPlaying) {
|
||||
console.log(nextProps.consoleEvent);
|
||||
nextProps.consoleEvent.forEach(consoleEvent => {
|
||||
if (consoleEvent.source === 'sketch') {
|
||||
const args = consoleEvent.arguments;
|
||||
|
|
|
@ -101,11 +101,12 @@ function hijackConsoleErrorsScript(offs) {
|
|||
var fileInfo = getScriptOff(lineNumber);
|
||||
data = msg + ' (' + fileInfo[1] + ': line ' + fileInfo[0] + ')';
|
||||
}
|
||||
window.parent.postMessage({
|
||||
|
||||
window.parent.postMessage([{
|
||||
method: 'error',
|
||||
arguments: data,
|
||||
source: 'sketch'
|
||||
}, '*');
|
||||
}], '*');
|
||||
return false;
|
||||
};
|
||||
</script>`;
|
||||
|
|
Loading…
Reference in a new issue