@ohhwells/bridge 0.1.7 → 0.1.8

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.js CHANGED
@@ -3888,7 +3888,10 @@ function OhhwellsBridge() {
3888
3888
  if (timer !== void 0) {
3889
3889
  clearTimeout(timer);
3890
3890
  autoSaveTimers.current.delete(key);
3891
- const html = sanitizeHtml(el.innerHTML);
3891
+ }
3892
+ const html = sanitizeHtml(el.innerHTML);
3893
+ const original = originalContentRef.current ?? "";
3894
+ if (html !== sanitizeHtml(original)) {
3892
3895
  postToParentRef.current({ type: "ow:change", nodes: [{ key, text: html }] });
3893
3896
  const h = document.documentElement.scrollHeight;
3894
3897
  if (h > 50) postToParentRef.current({ type: "ow:height", height: h });