porffor 0.42.0 → 0.42.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.
@@ -128,12 +128,13 @@ export default (funcs, globals, tags, pages, data, noTreeshake = false) => {
128
128
  );
129
129
  time('table section');
130
130
 
131
+ const emptyWrapperFunc = funcs.find(x => x.name === '#indirect#empty');
131
132
  const elementSection = !funcs.table ? [] : createSection(
132
133
  Section.element,
133
134
  encodeVector([ [
134
135
  0x00,
135
136
  Opcodes.i32_const, 0, Opcodes.end,
136
- ...encodeVector(directFuncs.map(x => unsignedLEB128((x.wrapperFunc ?? x).asmIndex)))
137
+ ...encodeVector(directFuncs.map(x => unsignedLEB128((x.wrapperFunc ?? emptyWrapperFunc ?? x).asmIndex)))
137
138
  ] ])
138
139
  );
139
140
  time('element section');