Skip to content

Conversation

ZhiruiLi
Copy link

@ZhiruiLi ZhiruiLi commented Mar 30, 2021

this may be undefined in strict mode, because source code may be wrapped by some lambda function before being executed. In this case, error will occur in the following code:

util.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long
         || /* istanbul ignore next */ util.global.Long
         || util.inquire("long");

Instead keeps the util.global as undefined, we assign user defined global to util.global. This can be very useful when using protobuf.js in some specifical env (for example: game engine).

this may be undefined in strict mode. Instead keeps the util.global as
undefined, use user defined global variable can be useful when using
protobuf.js in some specifical platform
Copy link

@h3902340 h3902340 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in Unity with Puerts. It's OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants