From 74a81d48cebf930d3e48cc06449596c43fc0a40a Mon Sep 17 00:00:00 2001 From: Adam Savitzky Date: Fri, 25 Oct 2013 11:28:56 -0700 Subject: [PATCH] Move PROTO.warn above its first use, fixes #16 --- protobuf.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/protobuf.js b/protobuf.js index 376d9e8..e6ff746 100644 --- a/protobuf.js +++ b/protobuf.js @@ -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") { @@ -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