Skip to content

Commit

Permalink
use spread operator instead of assign
Browse files Browse the repository at this point in the history
  • Loading branch information
Yen Truong committed Nov 19, 2021
1 parent 6e9f573 commit 5149885
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sample-app/src/utils/search-operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export async function getUserLocation(geolocationOptions?: PositionOptions): Pro
console.error('Error occured using geolocation API. Unable to determine user\'s location.');
reject(err);
},
Object.assign(defaultGeolocationOptions, geolocationOptions)
{ ...defaultGeolocationOptions, ...geolocationOptions }
);
} else {
reject('No access to geolocation API. Unable to determine user\'s location.');
Expand Down

0 comments on commit 5149885

Please sign in to comment.