Skip to content

Commit

Permalink
chore(perf): remove spread operators in favor of Object.assign
Browse files Browse the repository at this point in the history
  • Loading branch information
tbnritzdoge committed Apr 4, 2021
1 parent d8344e4 commit ec548e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/PetitioRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export class PetitioRequest {
*/
public option<T extends keyof ClientType.Options>(key: T, value: ClientType.Options[T]): this
public option(key: keyof ClientType.Options | ClientType.Options, value?: any) {
if (typeof key === "object") this.coreOptions = {...this.coreOptions, ...key};
if (typeof key === "object") Object.assign(this.coreOptions, key);
else this.coreOptions[key] = value;

return this;
Expand Down

0 comments on commit ec548e1

Please sign in to comment.