-
-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Upgrade immer to 10.1.1 (#2993)"
This reverts commit 45c0a02.
- Loading branch information
Showing
10 changed files
with
52 additions
and
307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ import _ from "../imports/lodash.js" | |
import "https://cdn.jsdelivr.net/gh/fonsp/[email protected]/lib/rebel-tag-input.mjs" | ||
|
||
//@ts-ignore | ||
import { produce } from "../imports/immer.js" | ||
import immer from "../imports/immer.js" | ||
import { useDialog } from "../common/useDialog.js" | ||
import { FeaturedCard } from "./welcome/FeaturedCard.js" | ||
import { useEventListener } from "../common/useEventListener.js" | ||
|
@@ -26,7 +26,7 @@ export const FrontMatterInput = ({ filename, remote_frontmatter, set_remote_fron | |
|
||
const fm_setter = (key) => (value) => | ||
set_frontmatter( | ||
produce((fm) => { | ||
immer((fm) => { | ||
_.set(fm, key, value) | ||
}) | ||
) | ||
|
@@ -87,7 +87,7 @@ export const FrontMatterInput = ({ filename, remote_frontmatter, set_remote_fron | |
onClick=${() => { | ||
// TODO | ||
set_frontmatter( | ||
produce((fm) => { | ||
immer((fm) => { | ||
_.unset(fm, path) | ||
}) | ||
) | ||
|
@@ -103,7 +103,7 @@ export const FrontMatterInput = ({ filename, remote_frontmatter, set_remote_fron | |
const fieldname = prompt("Field name:") | ||
if (fieldname) { | ||
set_frontmatter( | ||
produce((fm) => { | ||
immer((fm) => { | ||
_.set(fm, `${base_path}${fieldname}`, null) | ||
}) | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.