diff --git a/src/preamble.js b/src/preamble.js index fb8954566aa82..eb885e27c21a8 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -503,10 +503,9 @@ var splitModuleProxyHandler = { // When the table is dynamically laid out, the placeholder functions names // are offsets from the table base. In the main module, the table base is // always 1. - return wasmTable.get(1 + parseInt(prop))(...args); -#else - return wasmTable.get(prop)(...args); + prop = 1 + parseInt(prop); #endif + return wasmTable.get({{{ toIndexType('prop') }}})(...args); #endif } }