msgpackr 1.7.0-alpha6 → 1.7.0-alpha7

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
@@ -202,7 +202,7 @@
202
202
  // else more to read, but we are reading sequentially, so don't clear source yet
203
203
  return result
204
204
  } catch(error) {
205
- if (currentStructures.restoreStructures)
205
+ if (currentStructures?.restoreStructures)
206
206
  restoreStructures();
207
207
  clearSource();
208
208
  if (error instanceof RangeError || error.message.startsWith('Unexpected end of buffer') || position > srcEnd) {