client/src/index.js
function windowCloseHandler(event) {
    if(!options.windowCloseWarning) {
      return;
    }

    if(sync.state !== sync.SYNC_SYNCING) {
      return;
    }

    var confirmationMessage = "Sync currently underway, are you sure you want to close?";
    (event || global.event).returnValue = confirmationMessage;

    return confirmationMessage;
  }
function windowCloseHandler(event) {
    if(!options.windowCloseWarning) {
      return;
    }

    if(sync.state !== sync.SYNC_SYNCING) {
      return;
    }

    var confirmationMessage = "Sync currently underway, are you sure you want to close?";
    (event || global.event).returnValue = confirmationMessage;

    return confirmationMessage;
  }
function windowCloseHandler ( event ) { if ( ! options . windowCloseWarning ) { return ; } if ( sync . state !== sync . SYNC_SYNCING ) { return ; } var confirmationMessage = "Sync currently underway, are you sure you want to close?" ; ( event || global . event ) . returnValue = confirmationMessage ; return confirmationMessage ; }
Optionally warn when closing the window if still syncing
Optionally warn when closing the window if still syncing