diff --git a/server/webapp/WEB-INF/rails.new/spec/webpack/lib/plugin_endpoint_spec.js b/server/webapp/WEB-INF/rails.new/spec/webpack/lib/plugin_endpoint_spec.js
index <HASH>..<HASH> 100644
--- a/server/webapp/WEB-INF/rails.new/spec/webpack/lib/plugin_endpoint_spec.js
+++ b/server/webapp/WEB-INF/rails.new/spec/webpack/lib/plugin_endpoint_spec.js
@@ -39,9 +39,11 @@
       }
     };
 
-    window.postMessage = function(message, _origin) {
-      dispatch(mockEvent(message));
-    };
+    Object.defineProperty(window, "postMessage", {
+      value: function(message, _origin) {
+        dispatch(mockEvent(message));
+      }
+    });
 
     PluginEndpoint.ensure();
   });
Fix plugin_endpoint_spec in IE strict mode