Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Diff between working and non-working JS
--- game_common_pb.js 2019-08-28 11:46:27.000000000 -0600
+++ game_common_strict_pb.js 2019-08-28 11:56:15.000000000 -0600
@@ -10,26 +10,26 @@
var jspb = require('google-protobuf');
var goog = jspb;
-var global = Function('return this')();
+var proto = {};
-goog.exportSymbol('proto.game.ChatMessage', null, global);
-goog.exportSymbol('proto.game.CommandReceived', null, global);
-goog.exportSymbol('proto.game.CommandUpdate', null, global);
-goog.exportSymbol('proto.game.Exit', null, global);
-goog.exportSymbol('proto.game.Location', null, global);
-goog.exportSymbol('proto.game.MessageToUser', null, global);
-goog.exportSymbol('proto.game.OpenPortalMessage', null, global);
-goog.exportSymbol('proto.game.OpenPortalResponseMessage', null, global);
-goog.exportSymbol('proto.game.Player', null, global);
-goog.exportSymbol('proto.game.Portal', null, global);
-goog.exportSymbol('proto.game.RequestObjectTransferMessage', null, global);
-goog.exportSymbol('proto.game.Session', null, global);
-goog.exportSymbol('proto.game.ShoutMessage', null, global);
-goog.exportSymbol('proto.game.Stats', null, global);
-goog.exportSymbol('proto.game.TransferredObjectMessage', null, global);
-goog.exportSymbol('proto.game.UserInput', null, global);
-goog.exportSymbol('proto.game.UserInterfaceMessage', null, global);
-goog.exportSymbol('proto.game.UserInterfaceMessage.UiMessageCase', null, global);
+goog.exportSymbol('game.ChatMessage', null, proto);
+goog.exportSymbol('game.CommandReceived', null, proto);
+goog.exportSymbol('game.CommandUpdate', null, proto);
+goog.exportSymbol('game.Exit', null, proto);
+goog.exportSymbol('game.Location', null, proto);
+goog.exportSymbol('game.MessageToUser', null, proto);
+goog.exportSymbol('game.OpenPortalMessage', null, proto);
+goog.exportSymbol('game.OpenPortalResponseMessage', null, proto);
+goog.exportSymbol('game.Player', null, proto);
+goog.exportSymbol('game.Portal', null, proto);
+goog.exportSymbol('game.RequestObjectTransferMessage', null, proto);
+goog.exportSymbol('game.Session', null, proto);
+goog.exportSymbol('game.ShoutMessage', null, proto);
+goog.exportSymbol('game.Stats', null, proto);
+goog.exportSymbol('game.TransferredObjectMessage', null, proto);
+goog.exportSymbol('game.UserInput', null, proto);
+goog.exportSymbol('game.UserInterfaceMessage', null, proto);
+goog.exportSymbol('game.UserInterfaceMessage.UiMessageCase', null, proto);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@@ -3559,4 +3559,4 @@
};
-goog.object.extend(exports, proto.game);
+goog.object.extend(exports, proto);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment