File tree Expand file tree Collapse file tree 9 files changed +27
-21
lines changed
Expand file tree Collapse file tree 9 files changed +27
-21
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " leancloud-storage" ,
3- "version" : " 1.3.1 " ,
3+ "version" : " 1.3.2 " ,
44 "homepage" : " https://github.com/leancloud/javascript-sdk" ,
55 "authors" : [
66
Original file line number Diff line number Diff line change 1- # 1.3.1 日期:2016 年 7 月 21 日
1+ ## 1.3.2 日期:2016 年 7 月 26 日
2+ * 修复 1.3.1 中未彻底解决的 ` A promise was resolved even though it had already been resolved ` 异常问题
3+
4+ ## 1.3.1 日期:2016 年 7 月 21 日
25* 修复多次调用 ` AV.init ` 抛出 ` A promise was resolved even though it had already been resolved ` 异常的问题
36
47# 1.3.0 日期:2016 年 7 月 20 日
Original file line number Diff line number Diff line change @@ -10460,9 +10460,10 @@ const refreshServerUrlByRouter = () => {
1046010460
1046110461const setServerUrlByRegion = ( region = 'cn' ) => {
1046210462 getServerURLPromise = new AVPromise ( ) ;
10463+ const promise = getServerURLPromise ;
1046310464 // 如果用户在 init 之前设置了 APIServerURL,则跳过请求 router
1046410465 if ( AV . _config . APIServerURL ) {
10465- getServerURLPromise . resolve ( ) ;
10466+ promise . resolve ( ) ;
1046610467 return ;
1046710468 }
1046810469 // if not china server region, do not use router
@@ -10474,14 +10475,14 @@ const setServerUrlByRegion = (region = 'cn') => {
1047410475 return refreshServerUrlByRouter ( ) ;
1047510476 }
1047610477 } ) . then ( ( ) => {
10477- getServerURLPromise . resolve ( ) ;
10478+ promise . resolve ( ) ;
1047810479 } ) . catch ( ( error ) => {
10479- getServerURLPromise . reject ( error ) ;
10480+ promise . reject ( error ) ;
1048010481 } ) ;
1048110482 } else {
1048210483 AV . _config . region = region ;
1048310484 AV . _config . APIServerURL = API_HOST [ region ] ;
10484- getServerURLPromise . resolve ( ) ;
10485+ promise . resolve ( ) ;
1048510486 }
1048610487} ;
1048710488
@@ -13164,7 +13165,7 @@ module.exports = {
1316413165 * Each engineer has a duty to keep the code elegant
1316513166**/
1316613167
13167- module . exports = 'js1.3.1 ' ;
13168+ module . exports = 'js1.3.2 ' ;
1316813169
1316913170} , { } ] } , { } , [ 28 ] ) ( 28 )
1317013171} ) ;
Original file line number Diff line number Diff line change @@ -10333,9 +10333,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
1033310333 var region = arguments . length <= 0 || arguments [ 0 ] === undefined ? 'cn' : arguments [ 0 ] ;
1033410334
1033510335 getServerURLPromise = new AVPromise ( ) ;
10336+ var promise = getServerURLPromise ;
1033610337 // 如果用户在 init 之前设置了 APIServerURL,则跳过请求 router
1033710338 if ( AV . _config . APIServerURL ) {
10338- getServerURLPromise . resolve ( ) ;
10339+ promise . resolve ( ) ;
1033910340 return ;
1034010341 }
1034110342 // if not china server region, do not use router
@@ -10347,14 +10348,14 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
1034710348 return refreshServerUrlByRouter ( ) ;
1034810349 }
1034910350 } ) . then ( function ( ) {
10350- getServerURLPromise . resolve ( ) ;
10351+ promise . resolve ( ) ;
1035110352 } ) . catch ( function ( error ) {
10352- getServerURLPromise . reject ( error ) ;
10353+ promise . reject ( error ) ;
1035310354 } ) ;
1035410355 } else {
1035510356 AV . _config . region = region ;
1035610357 AV . _config . APIServerURL = API_HOST [ region ] ;
10357- getServerURLPromise . resolve ( ) ;
10358+ promise . resolve ( ) ;
1035810359 }
1035910360 } ;
1036010361
@@ -12961,6 +12962,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
1296112962 * Each engineer has a duty to keep the code elegant
1296212963 **/
1296312964
12964- module . exports = 'js1.3.1 ' ;
12965+ module . exports = 'js1.3.2 ' ;
1296512966 } , { } ] } , { } , [ 28 ] ) ( 28 ) ;
1296612967} ) ;
Original file line number Diff line number Diff line change @@ -227,9 +227,10 @@ var setServerUrlByRegion = function setServerUrlByRegion() {
227227 var region = arguments . length <= 0 || arguments [ 0 ] === undefined ? 'cn' : arguments [ 0 ] ;
228228
229229 getServerURLPromise = new AVPromise ( ) ;
230+ var promise = getServerURLPromise ;
230231 // 如果用户在 init 之前设置了 APIServerURL,则跳过请求 router
231232 if ( AV . _config . APIServerURL ) {
232- getServerURLPromise . resolve ( ) ;
233+ promise . resolve ( ) ;
233234 return ;
234235 }
235236 // if not china server region, do not use router
@@ -241,14 +242,14 @@ var setServerUrlByRegion = function setServerUrlByRegion() {
241242 return refreshServerUrlByRouter ( ) ;
242243 }
243244 } ) . then ( function ( ) {
244- getServerURLPromise . resolve ( ) ;
245+ promise . resolve ( ) ;
245246 } ) . catch ( function ( error ) {
246- getServerURLPromise . reject ( error ) ;
247+ promise . reject ( error ) ;
247248 } ) ;
248249 } else {
249250 AV . _config . region = region ;
250251 AV . _config . APIServerURL = API_HOST [ region ] ;
251- getServerURLPromise . resolve ( ) ;
252+ promise . resolve ( ) ;
252253 }
253254} ;
254255
Original file line number Diff line number Diff line change 55 * Each engineer has a duty to keep the code elegant
66**/
77
8- module . exports = 'js1.3.1 ' ;
8+ module . exports = 'js1.3.2 ' ;
Original file line number Diff line number Diff line change 11{
22 "name" : " leancloud-storage" ,
3- "version" : " 1.3.1 " ,
3+ "version" : " 1.3.2 " ,
44 "main" : " ./dist/node/index.js" ,
55 "description" : " LeanCloud JavaScript SDK." ,
66 "repository" : {
Original file line number Diff line number Diff line change 33 * Each engineer has a duty to keep the code elegant
44**/
55
6- module . exports = 'js1.3.1 ' ;
6+ module . exports = 'js1.3.2 ' ;
You can’t perform that action at this time.
0 commit comments