Comparing version 2.1.0-beta.3 to 2.1.0
@@ -56,2 +56,6 @@ 'use strict'; | ||
var defaultLoadingComponent = function defaultLoadingComponent() { | ||
return null; | ||
}; | ||
function asyncComponent(config) { | ||
@@ -75,5 +79,3 @@ var resolve = config.resolve; | ||
_this.LoadingComponent = config.LoadingComponent || function () { | ||
return null; | ||
}; | ||
_this.LoadingComponent = config.LoadingComponent || defaultLoadingComponent; | ||
_this.state = { | ||
@@ -145,2 +147,6 @@ AsyncComponent: null | ||
} | ||
dynamic.setDefaultLoadingComponent = function (LoadingComponent) { | ||
defaultLoadingComponent = LoadingComponent; | ||
}; | ||
module.exports = exports['default']; |
{ | ||
"name": "dva", | ||
"version": "2.1.0-beta.3", | ||
"version": "2.1.0", | ||
"description": "React and redux based, lightweight and elm-style framework.", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -12,2 +12,4 @@ import React, { Component } from 'react'; | ||
let defaultLoadingComponent = () => null; | ||
function asyncComponent(config) { | ||
@@ -20,3 +22,3 @@ const { resolve } = config; | ||
this.LoadingComponent = | ||
config.LoadingComponent || (() => null); | ||
config.LoadingComponent || defaultLoadingComponent; | ||
this.state = { | ||
@@ -76,1 +78,5 @@ AsyncComponent: null, | ||
} | ||
dynamic.setDefaultLoadingComponent = (LoadingComponent) => { | ||
defaultLoadingComponent = LoadingComponent; | ||
}; |
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
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3
98
1745822
25102