diff --git a/pages/books/test-driven-development-by-example.mdx b/pages/books/test-driven-development-by-example.mdx index 9d8717eb..3e70e1c0 100644 --- a/pages/books/test-driven-development-by-example.mdx +++ b/pages/books/test-driven-development-by-example.mdx @@ -1002,7 +1002,7 @@ class Money implements Expression { // ... reduce(to: string) { - const rate = this.currency === "CHF" && to === "USD"; + const rate = this.currency === "CHF" && to === "USD" ? 2 : 1; return new Money(this.amount / rate, to); } } @@ -1025,7 +1025,7 @@ class Money implements Expression { // ... reduce(bank: Bank, to: string) { - const rate = this.currency === "CHF" && to === "USD"; + const rate = this.currency === "CHF" && to === "USD" ? 2 : 1; return new Money(this.amount / rate, to); } }