Socket
Socket
Sign inDemoInstall

dva

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dva - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

8

lib/dynamic.js

@@ -35,9 +35,11 @@ 'use strict';

var app = config.app,
models = config.models,
component = config.component;
resolveModels = config.models,
resolveComponent = config.component;
return (0, _reactAsyncComponent.asyncComponent)((0, _extends3.default)({
resolve: config.resolve || function () {
var models = typeof resolveModels === 'function' ? resolveModels() : [];
var component = resolveComponent();
return new _promise2.default(function (resolve) {
_promise2.default.all([].concat((0, _toConsumableArray3.default)(models || []), [component])).then(function (ret) {
_promise2.default.all([].concat((0, _toConsumableArray3.default)(models), [component])).then(function (ret) {
if (!models || !models.length) {

@@ -44,0 +46,0 @@ return resolve(ret[0]);

{
"name": "dva",
"version": "2.0.0",
"version": "2.0.1",
"description": "React and redux based, lightweight and elm-style framework.",

@@ -35,3 +35,4 @@ "repository": {

"dependencies": {
"dva-core": "^1.0.0",
"babel-runtime": "^6.26.0",
"dva-core": "^1.0.1",
"global": "^4.3.2",

@@ -38,0 +39,0 @@ "history": "^4.6.3",

@@ -12,7 +12,9 @@ import { asyncComponent } from 'react-async-component';

export default function dynamic(config) {
const { app, models, component } = config;
const { app, models: resolveModels, component: resolveComponent } = config;
return asyncComponent({
resolve: config.resolve || function () {
const models = typeof resolveModels === 'function' ? resolveModels() : [];
const component = resolveComponent();
return new Promise((resolve) => {
Promise.all([...(models || []), component]).then((ret) => {
Promise.all([...models, component]).then((ret) => {
if (!models || !models.length) {

@@ -19,0 +21,0 @@ return resolve(ret[0]);

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

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

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

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