for #761, add source back to console messages

This commit is contained in:
Cassie Tarakajian 2018-11-15 17:19:50 -05:00
parent 00ea3bc281
commit b70d62164c
2 changed files with 3 additions and 2 deletions

View file

@ -81,7 +81,7 @@ class PreviewFrame extends React.Component {
handleConsoleEvent(messageEvent) {
if (Array.isArray(messageEvent.data)) {
const decodedMessages = messageEvent.data.map(message => Decode(message.log));
const decodedMessages = messageEvent.data.map(message => Object.assign(Decode(message.log), { source: message.source }));
decodedMessages.every((message, index, arr) => {
const { data: args } = message;

View file

@ -7,7 +7,8 @@ const consoleBuffer = [];
const LOGWAIT = 500;
Hook(window.console, (log) => {
consoleBuffer.push({
log
log,
source: 'sketch'
});
});
setInterval(() => {