@makeswift/runtime 0.2.14 → 0.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1002,7 +1002,7 @@ class Document$1 extends NextDocument__default["default"] {
1002
1002
  });
1003
1003
  }
1004
1004
  }
1005
- const version = "0.2.14";
1005
+ const version = "0.2.15";
1006
1006
  function isErrorWithMessage(error) {
1007
1007
  return typeof error === "object" && error !== null && "message" in error && typeof error.message === "string";
1008
1008
  }
@@ -1104,14 +1104,13 @@ Read more here: https://nextjs.org/blog/next-12-2#on-demand-incremental-static-r
1104
1104
  }
1105
1105
  case "element-tree": {
1106
1106
  const elementTree = req.body.elementTree;
1107
- const serializedReplacementContext = req.body.replacementContext;
1107
+ const replacementContext = req.body.replacementContext;
1108
1108
  if (elementTree == null) {
1109
1109
  return res.status(400).json({ message: "elementTree must be defined" });
1110
1110
  }
1111
- if (serializedReplacementContext == null) {
1111
+ if (replacementContext == null) {
1112
1112
  return res.status(400).json({ message: "replacementContext must be defined" });
1113
1113
  }
1114
- const replacementContext = reactPage.createReplacementContext(serializedReplacementContext);
1115
1114
  const generatedElementTree = ReactRuntime.copyElementTree(elementTree, replacementContext);
1116
1115
  const response = { elementTree: generatedElementTree };
1117
1116
  return res.json(response);