Skip to content
This repository has been archived by the owner on Jun 14, 2022. It is now read-only.

Commit

Permalink
feat: enable sourcemaps, fix loginWithToken emitter logic
Browse files Browse the repository at this point in the history
  • Loading branch information
noramass committed Mar 30, 2020
1 parent b7981de commit c8c235d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
output: ["umd", "iife", "esm", "cjs"].map(format => ({
file: `dist/${name}${format === "umd" ? "" : `.${format}`}.js`,
exports: "named",
sourceMap: true,
sourcemap: true,
format,
globals,
name,
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ export class SkeletonKey<USER_DATA = object, TOKEN_DATA = object>
if (this.isLoggedIn()) await this.logout();
try {
this.jwtBundle = { token, refreshToken };
this.user = (await this.client.me(token)) as AppUserRead & USER_DATA;
this.emit("login", this.user);
const user = this.user = (await this.client.me(token)) as AppUserRead & USER_DATA;
await this.persist();
this.emitSync("login", user);
} catch (ex) {
await this.logout();
}
Expand Down

0 comments on commit c8c235d

Please sign in to comment.