Skip to content

Commit d055b6e

Browse files
authored
uncommented the denormalize method inside the use-local-storage-draft hook file (#222)
1 parent 1f6dd86 commit d055b6e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

hooks/use-local-storage-draft.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ function normalizeDraftKey(key: string) {
3030
}
3131

3232
// Denormalize the draft key by removing the '_draft' suffix if present
33-
// function denormalizeDraftKey(key: string) {
34-
// return key.endsWith(DRAFT_SUFFIX) ? key.slice(0, -DRAFT_SUFFIX.length) : key;
35-
// }
33+
function denormalizeDraftKey(key: string) {
34+
return key.endsWith(DRAFT_SUFFIX) ? key.slice(0, -DRAFT_SUFFIX.length) : key;
35+
}
3636

3737
export function useLocalStorageDraft<T>({
3838
key,

0 commit comments

Comments
 (0)