Skip to content

Commit

Permalink
Other: Make sure that util.Long is overridden by AMD loaders only if …
Browse files Browse the repository at this point in the history
…present, see #730
  • Loading branch information
dcodeIO committed Mar 27, 2017
1 parent 29ce6ca commit e4a6b6f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/prelude.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
// Be nice to AMD
if (typeof define === "function" && define.amd)
define(["long"], function(Long) {
protobuf.util.Long = Long;
protobuf.configure();
if (Long && Long.fromValue) {
protobuf.util.Long = Long;
protobuf.configure();
}
return protobuf;
});

Expand Down

0 comments on commit e4a6b6f

Please sign in to comment.