@@ -38,17 +38,17 @@ angular.module("web").factory("Domains", [
3838
3939 signatureUrl ( key , expires , opt ) {
4040 expires = expires || this . maxLifetime ( ) ;
41- const newOpt = Object . assign ( opt || { } , { preferS3Adapter : true } ) ;
41+ const newOpt = Object . assign ( { } , opt , { preferS3Adapter : true } ) ;
4242 return QiniuClient . signatureUrl ( this . region , this . bucket , key , undefined , expires , newOpt ) ;
4343 }
4444
4545 getContent ( key , opt ) {
46- const newOpt = Object . assign ( opt || { } , { preferS3Adapter : true } ) ;
46+ const newOpt = Object . assign ( { } , opt , { preferS3Adapter : true } ) ;
4747 return QiniuClient . getContent ( this . region , this . bucket , key , this . toQiniuDomain ( ) , newOpt ) ;
4848 }
4949
5050 saveContent ( key , content , opt ) {
51- const newOpt = Object . assign ( opt || { } , { preferS3Adapter : true } ) ;
51+ const newOpt = Object . assign ( { } , opt , { preferS3Adapter : true } ) ;
5252 return QiniuClient . saveContent ( this . region , this . bucket , key , content , this . toQiniuDomain ( ) , newOpt ) ;
5353 }
5454
@@ -86,17 +86,17 @@ angular.module("web").factory("Domains", [
8686
8787 signatureUrl ( key , expires , opt ) {
8888 expires = expires || this . maxLifetime ( ) ;
89- const newOpt = Object . assign ( opt || { } , { preferKodoAdapter : true } ) ;
89+ const newOpt = Object . assign ( { } , opt , { preferKodoAdapter : true } ) ;
9090 return QiniuClient . signatureUrl ( this . region , this . bucket , key , this . domain , expires , newOpt ) ;
9191 }
9292
9393 getContent ( key , opt ) {
94- const newOpt = Object . assign ( opt || { } , { preferKodoAdapter : true } ) ;
94+ const newOpt = Object . assign ( { } , opt , { preferKodoAdapter : true } ) ;
9595 return QiniuClient . getContent ( this . region , this . bucket , key , this . toQiniuDomain ( ) , newOpt ) ;
9696 }
9797
9898 saveContent ( key , content , opt ) {
99- const newOpt = Object . assign ( opt || { } , { preferKodoAdapter : true } ) ;
99+ const newOpt = Object . assign ( { } , opt , { preferKodoAdapter : true } ) ;
100100 return QiniuClient . saveContent ( this . region , this . bucket , key , content , this . toQiniuDomain ( ) , newOpt ) ;
101101 }
102102
0 commit comments