Skip to content

Commit 0ddda20

Browse files
committed
Add some window defaults
1 parent 163eaa3 commit 0ddda20

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

protobufdumper.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,18 @@ function Start(knownMessages, knownServices, files) {
4949
let allProtos;
5050

5151
files.forEach((file) => {
52-
global.window = {};
52+
global.window = {
53+
VALVE_PUBLIC_PATH: "",
54+
webpackJsonp: [],
55+
requestAnimationFrame: (a) => a(),
56+
cancelAnimationFrame: () => {},
57+
};
5358

5459
try {
5560
require(file);
5661
} catch (e) {
57-
console.error(`Unable to execute "${path.basename(file)}", skipping.`);
62+
console.error(`Unable to execute "${path.basename(file)}": ${e}`);
63+
return;
5864
}
5965

6066
global.window.webpackJsonp.forEach((file) => {

0 commit comments

Comments
 (0)