@agoric/eventual-send
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -176,5 +176,2 @@ 'use strict'; | ||
} | ||
if (presenceToHandler.has(presence)) { | ||
throw TypeError(`Presence ${presence} is already mapped`); | ||
} | ||
if (presence && typeof presence.then === 'function') { | ||
@@ -186,5 +183,8 @@ throw TypeError( | ||
// Create table entries for the presence mapped to the fulfilledHandler. | ||
presenceToPromise.set(presence, handledP); | ||
presenceToHandler.set(presence, fulfilledHandler); | ||
// Just like platform Promises, multiple calls to resolve don't fail. | ||
if (!presenceToHandler.has(presence)) { | ||
// Create table entries for the presence mapped to the fulfilledHandler. | ||
presenceToPromise.set(presence, handledP); | ||
presenceToHandler.set(presence, fulfilledHandler); | ||
} | ||
@@ -191,0 +191,0 @@ // Remove the mapping, as our fulfilledHandler should be used instead. |
@@ -174,5 +174,2 @@ /** | ||
} | ||
if (presenceToHandler.has(presence)) { | ||
throw TypeError(`Presence ${presence} is already mapped`); | ||
} | ||
if (presence && typeof presence.then === 'function') { | ||
@@ -184,5 +181,8 @@ throw TypeError( | ||
// Create table entries for the presence mapped to the fulfilledHandler. | ||
presenceToPromise.set(presence, handledP); | ||
presenceToHandler.set(presence, fulfilledHandler); | ||
// Just like platform Promises, multiple calls to resolve don't fail. | ||
if (!presenceToHandler.has(presence)) { | ||
// Create table entries for the presence mapped to the fulfilledHandler. | ||
presenceToPromise.set(presence, handledP); | ||
presenceToHandler.set(presence, fulfilledHandler); | ||
} | ||
@@ -189,0 +189,0 @@ // Remove the mapping, as our fulfilledHandler should be used instead. |
@@ -180,5 +180,2 @@ (function (global, factory) { | ||
} | ||
if (presenceToHandler.has(presence)) { | ||
throw TypeError(`Presence ${presence} is already mapped`); | ||
} | ||
if (presence && typeof presence.then === 'function') { | ||
@@ -190,5 +187,8 @@ throw TypeError( | ||
// Create table entries for the presence mapped to the fulfilledHandler. | ||
presenceToPromise.set(presence, handledP); | ||
presenceToHandler.set(presence, fulfilledHandler); | ||
// Just like platform Promises, multiple calls to resolve don't fail. | ||
if (!presenceToHandler.has(presence)) { | ||
// Create table entries for the presence mapped to the fulfilledHandler. | ||
presenceToPromise.set(presence, handledP); | ||
presenceToHandler.set(presence, fulfilledHandler); | ||
} | ||
@@ -195,0 +195,0 @@ // Remove the mapping, as our fulfilledHandler should be used instead. |
{ | ||
"name": "@agoric/eventual-send", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Extend a Promise class to implement the eventual-send API", | ||
@@ -5,0 +5,0 @@ "main": "dist/eventual-send.cjs.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41136