diff --git a/sendbeacon.js b/sendbeacon.js
index <HASH>..<HASH> 100755
--- a/sendbeacon.js
+++ b/sendbeacon.js
@@ -12,7 +12,7 @@ function polyfill() {
 };
 
 function sendBeacon(url, data) {
-  const event = this.event && this.event.type;
+  const event = this.event && this.event.type ? this.event.type : this.event;
   const sync = event === 'unload' || event === 'beforeunload';
 
   const xhr = ('XMLHttpRequest' in this) ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
fix: so that sync will not always be false

the old state makes sync always false because the value for event will always be true/false not 'unload' or 'beforeunload'