diff --git a/lib/prelude.js b/lib/prelude.js index ee30929ac..e1743fa5d 100644 --- a/lib/prelude.js +++ b/lib/prelude.js @@ -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; });