Skip to content

Commit 0747ece

Browse files
committed
fix: fix showMessage typo
1 parent 538229a commit 0747ece

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/lib/router-builder.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ test.afterEach(() => {
5151
});
5252

5353
test.serial('should accept showError options when its true', async (t) => {
54-
router = new RouterBuilder({ shoeMessage: true });
54+
router = new RouterBuilder({ showMessage: true });
5555

5656
router.get(() => {
5757
throw new Error('TEST_ERROR');
@@ -69,7 +69,7 @@ test.serial('should accept showError options when its true', async (t) => {
6969
});
7070

7171
test.serial('should accept showError options when its false', async (t) => {
72-
router = new RouterBuilder({ shoeMessage: false });
72+
router = new RouterBuilder({ showMessage: false });
7373

7474
router.get(() => {
7575
throw new Error('TEST_ERROR');

src/lib/router-builder.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export type ErrorApiResponse = { success: false; message: string };
4949
*/
5050
export type RouterBuilderOptions = Partial<{
5151
error: ApiErrorHandler;
52-
shoeMessage: boolean;
52+
showMessage: boolean;
5353
}>;
5454

5555
/**
@@ -101,8 +101,8 @@ export class RouterBuilder {
101101
this.routerOptions.error =
102102
options.error ||
103103
makeErrorHandler(
104-
typeof options.shoeMessage === 'boolean'
105-
? options.shoeMessage
104+
typeof options.showMessage === 'boolean'
105+
? options.showMessage
106106
: process.env.NODE_ENV !== 'production'
107107
);
108108
}

0 commit comments

Comments
 (0)