Socket
Socket
Sign inDemoInstall

dva

Package Overview
Dependencies
52
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.6.0-beta.14 to 2.6.0-beta.15

21

dist/index.esm.js

@@ -163,3 +163,3 @@ import _objectSpread from '@babel/runtime/helpers/esm/objectSpread';

setupApp: function setupApp(app) {
app._history = patchHistory(history); // app._history = patchHistory(history);
app._history = patchHistory(history);
}

@@ -241,4 +241,21 @@ };

history.listen = function (callback) {
// Let ConnectedRouter to sync history to store first
// connected-react-router's version is locked since the check function may be broken
// ref: https://github.com/umijs/umi/issues/2693
var isConnectedRouterHandler = callback.name === 'handleLocationChange' && callback.toString().indexOf('onLocationChanged') > -1;
callback(history.location, history.action);
return oldListen.call(history, callback);
return oldListen.call(history, function () {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
if (isConnectedRouterHandler) {
callback.apply(void 0, args);
} else {
// Delay all listeners besides ConnectedRouter
setTimeout(function () {
callback.apply(void 0, args);
});
}
});
};

@@ -245,0 +262,0 @@

@@ -293,3 +293,3 @@ 'use strict';

setupApp: function setupApp(app) {
app._history = patchHistory(history$1); // app._history = patchHistory(history);
app._history = patchHistory(history$1);
}

@@ -371,4 +371,21 @@ };

history.listen = function (callback) {
// Let ConnectedRouter to sync history to store first
// connected-react-router's version is locked since the check function may be broken
// ref: https://github.com/umijs/umi/issues/2693
var isConnectedRouterHandler = callback.name === 'handleLocationChange' && callback.toString().indexOf('onLocationChanged') > -1;
callback(history.location, history.action);
return oldListen.call(history, callback);
return oldListen.call(history, function () {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
if (isConnectedRouterHandler) {
callback.apply(void 0, args);
} else {
// Delay all listeners besides ConnectedRouter
setTimeout(function () {
callback.apply(void 0, args);
});
}
});
};

@@ -375,0 +392,0 @@

4

package.json
{
"name": "dva",
"version": "2.6.0-beta.14",
"version": "2.6.0-beta.15",
"description": "React and redux based, lightweight and elm-style framework.",

@@ -37,3 +37,3 @@ "main": "dist/index.js",

"@types/react-router-dom": "^4.3.1",
"connected-react-router": "^6.3.2",
"connected-react-router": "6.3.2",
"dva-core": "2.0.0",

@@ -40,0 +40,0 @@ "global": "^4.3.2",

@@ -33,3 +33,2 @@ import React from 'react';

app._history = patchHistory(history);
// app._history = patchHistory(history);
},

@@ -110,4 +109,19 @@ };

history.listen = callback => {
// Let ConnectedRouter to sync history to store first
// connected-react-router's version is locked since the check function may be broken
// ref: https://github.com/umijs/umi/issues/2693
const isConnectedRouterHandler =
callback.name === 'handleLocationChange' &&
callback.toString().indexOf('onLocationChanged') > -1;
callback(history.location, history.action);
return oldListen.call(history, callback);
return oldListen.call(history, (...args) => {
if (isConnectedRouterHandler) {
callback(...args);
} else {
// Delay all listeners besides ConnectedRouter
setTimeout(() => {
callback(...args);
});
}
});
};

@@ -114,0 +128,0 @@ return history;

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc