Skip to content

Commit

Permalink
Move PROTO.warn above its first use, fixes sirikata#16
Browse files Browse the repository at this point in the history
  • Loading branch information
adambom committed Oct 25, 2013
1 parent 7ecb1ae commit 74a81d4
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions protobuf.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ PROTO.IsArray = (function() {
}
})();

/**
* @param {string} s
*/
PROTO.warn = function (s) {
if (typeof(self.console)!="undefined" && self.console.log) {
self.console.log(s);
}
};

PROTO.DefineProperty = (function () {
var DefineProperty;
if (typeof(Object.defineProperty) != "undefined") {
Expand Down Expand Up @@ -112,14 +121,6 @@ PROTO.wiretypes = {
PROTO.optional = 'optional';
PROTO.repeated = 'repeated';
PROTO.required = 'required';
/**
* @param {string} s
*/
PROTO.warn = function (s) {
if (typeof(self.console)!="undefined" && self.console.log) {
self.console.log(s);
}
};

/**
* @constructor
Expand Down

0 comments on commit 74a81d4

Please sign in to comment.