Skip to content

Commit e4a6b6f

Browse files
committed
Other: Make sure that util.Long is overridden by AMD loaders only if present, see #730
1 parent 29ce6ca commit e4a6b6f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/prelude.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
// Be nice to AMD
1919
if (typeof define === "function" && define.amd)
2020
define(["long"], function(Long) {
21-
protobuf.util.Long = Long;
22-
protobuf.configure();
21+
if (Long && Long.fromValue) {
22+
protobuf.util.Long = Long;
23+
protobuf.configure();
24+
}
2325
return protobuf;
2426
});
2527

0 commit comments

Comments
 (0)