Skip Electron's logs or new lines

This commit is contained in:
Mohammad Fares 2018-07-25 16:46:32 +03:00
parent 4d2c989829
commit c4cc8886a5
2 changed files with 7 additions and 1 deletions

View File

@ -99,6 +99,11 @@ function renderFrames(records, options) {
render.stdout.on('data', function(data) {
// Is not a recordIndex (to skip Electron's logs or new lines)
if (di.is.not.number(parseInt(data.toString()))) {
return;
}
progressBar.tick();
// Rendering is completed

View File

@ -42,9 +42,10 @@ function createWindow() {
* A callback function for the event:
* When a frame is captured
*
* @param {Object} event
* @param {Number} recordIndex
*/
ipcMain.on('captured', function(recordIndex) {
ipcMain.on('captured', function(event, recordIndex) {
console.log(recordIndex);