diff --git a/AUTHORS b/AUTHORS index 5416f8dec17d8..7e42decb1d5f3 100644 --- a/AUTHORS +++ b/AUTHORS @@ -590,4 +590,5 @@ a license to everyone to use it as detailed in LICENSE.) * Alexander Vestin * Xiaobing Yang * Alexandra Cherdantseva -* Skye Gibney \ No newline at end of file +* Michael Schmuki +* Skye Gibney diff --git a/src/library_pthread.js b/src/library_pthread.js index 77f9ce794bb7d..d6866c7aaefec 100644 --- a/src/library_pthread.js +++ b/src/library_pthread.js @@ -648,8 +648,9 @@ var LibraryPThread = { var offscreenCanvases = {}; // Dictionary of OffscreenCanvas objects we'll transfer to the created thread to own var moduleCanvasId = Module['canvas'] ? Module['canvas'].id : ''; - for (var name of transferredCanvasNames) { - name = name.trim(); + // Note that transferredCanvasNames might be null (so we cannot do a for-of loop). + for (var i in transferredCanvasNames) { + var name = transferredCanvasNames[i].trim(); var offscreenCanvasInfo; try { if (name == '#canvas') {