Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ahooks

Package Overview
Dependencies
Maintainers
5
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ahooks - npm Package Compare versions

Comparing version 3.0.6 to 3.0.7

9

es/useRequest/src/utils/cachePromise.js

@@ -10,5 +10,10 @@ var cachePromise = new Map();

// Because the promise.finally will change the reference of the promise
cachePromise.set(cacheKey, promise);
promise["finally"](function () {
cachePromise.set(cacheKey, promise); // no use promise.finally for compatibility
promise.then(function (res) {
cachePromise["delete"](cacheKey);
return res;
})["catch"](function (err) {
cachePromise["delete"](cacheKey);
throw err;
});

@@ -15,0 +20,0 @@ };

@@ -18,5 +18,10 @@ "use strict";

// Because the promise.finally will change the reference of the promise
cachePromise.set(cacheKey, promise);
promise["finally"](function () {
cachePromise.set(cacheKey, promise); // no use promise.finally for compatibility
promise.then(function (res) {
cachePromise["delete"](cacheKey);
return res;
})["catch"](function (err) {
cachePromise["delete"](cacheKey);
throw err;
});

@@ -23,0 +28,0 @@ };

{
"name": "ahooks",
"version": "3.0.6",
"version": "3.0.7",
"description": "react hooks library",

@@ -61,3 +61,3 @@ "keywords": [

"license": "MIT",
"gitHead": "f985ed77755a57939706b08b1bbb1806acb24c59"
"gitHead": "eeffc29756a2126b25247a211db44e54966613b6"
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc