Skip to content

Commit

Permalink
fix(api-core): typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Kasey Powers committed Oct 19, 2018
1 parent 6e45351 commit f543296
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/api-core/src/resources/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,28 @@ export default class AvSettings extends AvApi {
});
}

setApplication(applicaitonId, data, config) {
setApplication(applicationId, data, config) {
if (!this.avUsers || !this.avUsers.me) {
throw new Error('avUsers must be defined');
}

if (
typeof applicaitonId !== 'string' &&
typeof applicaitonId !== 'number'
typeof applicationId !== 'string' &&
typeof applicationId !== 'number'
) {
config = data;
data = applicaitonId;
applicaitonId = '';
data = applicationId;
applicationId = '';
}

if (!applicaitonId && (!data || !data.scope || !data.scope.applicationId)) {
if (!applicationId && (!data || !data.scope || !data.scope.applicationId)) {
throw new Error('applicationId must be defined');
}

return this.avUsers.me().then(user => {
data = data || {};
data.scope = data.scope || {};
data.scope.applicationId = applicaitonId;
data.scope.applicationId = applicationId;
data.scope.userId = user.id;
return this.update(data, config);
});
Expand Down

0 comments on commit f543296

Please sign in to comment.