This repository was archived by the owner on Jan 30, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import EmberError from '@ember/error';
3
3
import Mixin from '@ember/object/mixin' ;
4
4
import { get } from '@ember/object' ;
5
5
import { isEmpty } from '@ember/utils' ;
6
- import { assign } from '@ember/polyfills' ;
7
6
import { join } from '@ember/runloop' ;
8
7
import { warn , runInDebug } from '@ember/debug' ;
9
8
import Ember from 'ember' ;
@@ -434,15 +433,15 @@ export default Mixin.create({
434
433
*/
435
434
_getFullHeadersHash ( headers ?: Headers ) : Headers {
436
435
const classHeaders = get ( this , 'headers' ) ;
437
- return assign ( { } , classHeaders ! , headers ! ) ;
436
+ return { ... classHeaders ! , ... headers ! } ;
438
437
} ,
439
438
440
439
/**
441
440
* Created a normalized set of options from the per-request and
442
441
* service-level settings
443
442
*/
444
443
options ( url : string , options : AJAXOptions = { } ) : AJAXOptions {
445
- options = assign ( { } , options ) ;
444
+ options = { ... options } ;
446
445
options . url = this . _buildURL ( url , options ) ;
447
446
options . type = options . type || 'GET' ;
448
447
options . dataType = options . dataType || 'json' ;
Original file line number Diff line number Diff line change 1
1
import Mixin from '@ember/object/mixin' ;
2
2
import { isArray } from '@ember/array' ;
3
3
import { isNone } from '@ember/utils' ;
4
- import { assign } from '@ember/polyfills' ;
5
4
6
5
import isString from '../../-private/utils/is-string' ;
7
6
import { Headers } from '../../-private/types' ;
@@ -83,7 +82,7 @@ export default Mixin.create({
83
82
if ( isJsonApiErrorResponse ( payload ) ) {
84
83
return payload . errors . map ( function ( error ) {
85
84
if ( isObject ( error ) ) {
86
- const ret = assign ( { } , error ) ;
85
+ const ret = { ... error } ;
87
86
ret . status = `${ error . status } ` ;
88
87
return ret ;
89
88
} else {
Original file line number Diff line number Diff line change 1
1
import Application from '../../app' ;
2
2
import config from '../../config/environment' ;
3
- import { assign } from '@ember/polyfills' ;
4
3
import { run } from '@ember/runloop' ;
5
4
6
5
export default function startApp ( attrs ) {
7
- let attributes = assign ( { } , config . APP ) ;
6
+ let attributes = Object . assign ( { } , config . APP ) ;
8
7
attributes . autoboot = true ;
9
- attributes = assign ( attributes , attrs ) ; // use defaults, but you can override;
8
+ attributes = Object . assign ( attributes , attrs ) ; // use defaults, but you can override;
10
9
11
10
return run ( ( ) => {
12
11
let application = Application . create ( attributes ) ;
You can’t perform that action at this time.
0 commit comments