Skip to content

Commit

Permalink
fix: 🐛 fix history not working
Browse files Browse the repository at this point in the history
set default cache to undefined instead of an object
  • Loading branch information
vivaxy committed Oct 13, 2020
1 parent 5f367dd commit 8cb774d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/gacp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import runHook from './shell/run-hook';
import { EMOJI_TYPES } from './configs';
import * as logger from './shell/logger';
import checkNeedsPush from './git/check-needs-push';
import { clearHistory, flushHistory } from './messages/history';
import { clearHistory } from './messages/history';

type Hooks = {
postpush: string;
Expand Down Expand Up @@ -116,5 +116,4 @@ export default async function gacp({
await runTasks({ cwd, add, push, emoji, editor, hooks });
const endTime = getNow();
log.success(`Done in ${(endTime - startTime) / 1000}s`);
await flushHistory();
}
2 changes: 1 addition & 1 deletion src/messages/history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const DEFAULT_MESSAGES: Messages = {
footer: '',
};

let cache: Messages = DEFAULT_MESSAGES;
let cache: Messages;

function debug(...message: any[]) {
log.debug('gacp:history', ...message);
Expand Down

0 comments on commit 8cb774d

Please sign in to comment.