mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-16 06:51:27 +00:00
Use guard
This commit is contained in:
parent
03379118c6
commit
88982514b1
@ -31,9 +31,8 @@ export class GildedRose {
|
||||
}
|
||||
|
||||
function updateSellIn(item: Item) {
|
||||
if (item.name != 'Sulfuras, Hand of Ragnaros') {
|
||||
item.sellIn = item.sellIn - 1;
|
||||
}
|
||||
if (item.name == 'Sulfuras, Hand of Ragnaros') return
|
||||
item.sellIn = item.sellIn - 1;
|
||||
}
|
||||
|
||||
function updateItemQuality({name, quality, sellIn, ...rest}: Item): number {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user