@w100n/documents 0.15.0 → 0.15.1

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.
@@ -2208,8 +2208,10 @@ var Writer = class {
2208
2208
  }
2209
2209
  if (want.note) {
2210
2210
  const u = i >= 0 ? A[i] : null;
2211
- if (u?.note && u.note.id === want.note.id) out.push({ ch: u.ch, raw: u.raw, run: u.run, ctx: u.ctx, u, fmt: u.fmt });
2212
- else {
2211
+ if (u?.note && (u.note.id === want.note.id || !want.note.id)) {
2212
+ want.note.id = u.note.id;
2213
+ out.push({ ch: u.ch, raw: u.raw, run: u.run, ctx: u.ctx, u, fmt: u.fmt });
2214
+ } else {
2213
2215
  want.note.id = typeof want.note.id === "string" && want.note.id ? want.note.id : String(this.noteId());
2214
2216
  out.push({ ch: want.ch, raw: `<w:footnoteReference w:id="${want.note.id}"/>`, run: { open: "<w:r>", rPr: '<w:rPr><w:vertAlign w:val="superscript"/></w:rPr>', fmt: plain, el: null, parent: null }, ctx: [], u: null, fmt: plain });
2215
2217
  }
@@ -3642,4 +3644,4 @@ export {
3642
3644
  writeDocx,
3643
3645
  texts
3644
3646
  };
3645
- //# sourceMappingURL=chunk-M4OQG3EN.js.map
3647
+ //# sourceMappingURL=chunk-CAPICJ6B.js.map