Skip to content

Commit eb8e6e1

Browse files
committed
bypass jsonpatch
1 parent 824eeb5 commit eb8e6e1

File tree

2 files changed

+2
-58
lines changed

2 files changed

+2
-58
lines changed

src/idom/core/_fixed_jsonpatch.py

-56
This file was deleted.

src/idom/core/serve.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
from typing import Any, Awaitable, Callable, Dict, List, NamedTuple, cast
77

88
from anyio import create_task_group
9+
from jsonpatch import apply_patch
910

10-
from ._fixed_jsonpatch import apply_patch, make_patch # type: ignore
1111
from .layout import LayoutEvent, LayoutUpdate
1212
from .types import LayoutType, VdomJson
1313

@@ -74,7 +74,7 @@ def apply_to(self, model: VdomJson) -> VdomJson:
7474
@classmethod
7575
def create_from(cls, update: LayoutUpdate) -> VdomJsonPatch:
7676
"""Return a patch given an layout update"""
77-
return cls(update.path, make_patch(update.old or {}, update.new).patch)
77+
return cls(update.path, {"op": "replace", "path": "", "value": update.new})
7878

7979

8080
async def _single_outgoing_loop(

0 commit comments

Comments
 (0)