Comparing version 0.6.4 to 0.6.5
"use strict"; | ||
var fakeNullFiber = function Fiber(){}; | ||
var fakeNullFiber = new (function Fiber(){}); | ||
var localKey = "_optimism_local"; | ||
@@ -10,14 +10,11 @@ | ||
try { | ||
var fiberPath = require.resolve("fibers"); | ||
} catch (e) {} | ||
if (fiberPath) { | ||
var Fiber = require(fiberPath); | ||
// If we were able to require("fibers"), redefine the getCurrentFiber | ||
// function so that it has a chance to return Fiber.current. | ||
getCurrentFiber = function () { | ||
return Fiber.current || fakeNullFiber; | ||
}; | ||
if (typeof module === "object") { | ||
try { | ||
var Fiber = module.require("fibers"); | ||
// If we were able to require fibers, redefine the getCurrentFiber | ||
// function so that it has a chance to return Fiber.current. | ||
getCurrentFiber = function () { | ||
return Fiber.current || fakeNullFiber; | ||
}; | ||
} catch (e) {} | ||
} | ||
@@ -24,0 +21,0 @@ |
{ | ||
"name": "optimism", | ||
"version": "0.6.4", | ||
"version": "0.6.5", | ||
"author": "Ben Newman <ben@benjamn.com>", | ||
@@ -5,0 +5,0 @@ "description": "Composable reactive caching with efficient invalidation.", |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
0
19165
515