1
1
/**
2
- * vue-resource v0.1.9
2
+ * vue-resource v0.1.10
3
3
* https://github.com/vuejs/vue-resource
4
4
* Released under the MIT License.
5
5
*/
@@ -359,7 +359,7 @@ return /******/ (function(modules) { // webpackBootstrap
359
359
}
360
360
361
361
options = _ . extend ( true , { url : url } ,
362
- Http . options , _ . options ( 'http' , this , options )
362
+ Http . options , _ . options ( 'http' , self , options )
363
363
) ;
364
364
365
365
if ( options . crossOrigin === null ) {
@@ -378,7 +378,7 @@ return /******/ (function(modules) { // webpackBootstrap
378
378
delete options . data ;
379
379
}
380
380
381
- if ( options . emulateHTTP && ! option . crossOrigin && / ^ ( p u t | p a t c h | d e l e t e ) $ / i. test ( options . method ) ) {
381
+ if ( options . emulateHTTP && ! options . crossOrigin && / ^ ( p u t | p a t c h | d e l e t e ) $ / i. test ( options . method ) ) {
382
382
options . headers [ 'X-HTTP-Method-Override' ] = options . method ;
383
383
options . method = 'post' ;
384
384
}
@@ -396,7 +396,7 @@ return /******/ (function(modules) { // webpackBootstrap
396
396
options . data = JSON . stringify ( options . data ) ;
397
397
}
398
398
399
- promise = ( options . method . toLowerCase ( ) == 'jsonp' ? jsonp : xhr ) . call ( this , this . $url || Url , options ) ;
399
+ promise = ( options . method . toLowerCase ( ) == 'jsonp' ? jsonp : xhr ) . call ( self , self . $url || Url , options ) ;
400
400
401
401
promise . then ( transformResponse , transformResponse ) ;
402
402
@@ -565,9 +565,13 @@ return /******/ (function(modules) { // webpackBootstrap
565
565
* Promises/A+ polyfill v1.1.0 (https://github.com/bramstein/promis)
566
566
*/
567
567
568
+ var RESOLVED = 0 ;
569
+ var REJECTED = 1 ;
570
+ var PENDING = 2 ;
571
+
568
572
function Promise ( executor ) {
569
573
570
- this . state = Promise . State . PENDING ;
574
+ this . state = PENDING ;
571
575
this . value = undefined ;
572
576
this . deferred = [ ] ;
573
577
@@ -584,12 +588,6 @@ return /******/ (function(modules) { // webpackBootstrap
584
588
}
585
589
}
586
590
587
- Promise . State = {
588
- RESOLVED : 0 ,
589
- REJECTED : 1 ,
590
- PENDING : 2
591
- } ;
592
-
593
591
Promise . reject = function ( r ) {
594
592
return new Promise ( function ( resolve , reject ) {
595
593
reject ( r ) ;
@@ -641,7 +639,7 @@ return /******/ (function(modules) { // webpackBootstrap
641
639
p . resolve = function resolve ( x ) {
642
640
var promise = this ;
643
641
644
- if ( promise . state === Promise . State . PENDING ) {
642
+ if ( promise . state === PENDING ) {
645
643
if ( x === promise ) {
646
644
throw new TypeError ( 'Promise settled with itself.' ) ;
647
645
}
@@ -672,7 +670,7 @@ return /******/ (function(modules) { // webpackBootstrap
672
670
}
673
671
return ;
674
672
}
675
- promise . state = Promise . State . RESOLVED ;
673
+ promise . state = RESOLVED ;
676
674
promise . value = x ;
677
675
promise . notify ( ) ;
678
676
}
@@ -681,12 +679,12 @@ return /******/ (function(modules) { // webpackBootstrap
681
679
p . reject = function reject ( reason ) {
682
680
var promise = this ;
683
681
684
- if ( promise . state === Promise . State . PENDING ) {
682
+ if ( promise . state === PENDING ) {
685
683
if ( reason === promise ) {
686
684
throw new TypeError ( 'Promise settled with itself.' ) ;
687
685
}
688
686
689
- promise . state = Promise . State . REJECTED ;
687
+ promise . state = REJECTED ;
690
688
promise . value = reason ;
691
689
promise . notify ( ) ;
692
690
}
@@ -696,7 +694,7 @@ return /******/ (function(modules) { // webpackBootstrap
696
694
var promise = this ;
697
695
698
696
async ( function ( ) {
699
- if ( promise . state !== Promise . State . PENDING ) {
697
+ if ( promise . state !== PENDING ) {
700
698
while ( promise . deferred . length ) {
701
699
var deferred = promise . deferred . shift ( ) ,
702
700
onResolved = deferred [ 0 ] ,
@@ -705,13 +703,13 @@ return /******/ (function(modules) { // webpackBootstrap
705
703
reject = deferred [ 3 ] ;
706
704
707
705
try {
708
- if ( promise . state === Promise . State . RESOLVED ) {
706
+ if ( promise . state === RESOLVED ) {
709
707
if ( typeof onResolved === 'function' ) {
710
708
resolve ( onResolved . call ( undefined , promise . value ) ) ;
711
709
} else {
712
710
resolve ( promise . value ) ;
713
711
}
714
- } else if ( promise . state === Promise . State . REJECTED ) {
712
+ } else if ( promise . state === REJECTED ) {
715
713
if ( typeof onRejected === 'function' ) {
716
714
resolve ( onRejected . call ( undefined , promise . value ) ) ;
717
715
} else {
0 commit comments