Skip to content

Commit 7777b3c

Browse files
committed
Properly resolve extend references, fixes #103
1 parent 36e5cc8 commit 7777b3c

9 files changed

+15
-15
lines changed

ProtoBuf.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* @const
3939
* @expose
4040
*/
41-
ProtoBuf.VERSION = "2.0.4";
41+
ProtoBuf.VERSION = "2.0.5";
4242

4343
/**
4444
* Wire types.
@@ -3242,7 +3242,7 @@
32423242
this.ptr.addChild(obj);
32433243
obj = null;
32443244
} else if (Builder.isValidExtend(def)) {
3245-
obj = this.lookup(def["ref"]);
3245+
obj = this.ptr.resolve(def["ref"]);
32463246
if (obj) {
32473247
for (i=0; i<def["fields"].length; i++) { // i=Fields
32483248
if (obj.hasChild(def['fields'][i]['id'])) {

ProtoBuf.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ProtoBuf.min.map

+2-2
Large diffs are not rendered by default.

ProtoBuf.noparse.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* @const
3939
* @expose
4040
*/
41-
ProtoBuf.VERSION = "2.0.4";
41+
ProtoBuf.VERSION = "2.0.5";
4242

4343
/**
4444
* Wire types.
@@ -2342,7 +2342,7 @@
23422342
this.ptr.addChild(obj);
23432343
obj = null;
23442344
} else if (Builder.isValidExtend(def)) {
2345-
obj = this.lookup(def["ref"]);
2345+
obj = this.ptr.resolve(def["ref"]);
23462346
if (obj) {
23472347
for (i=0; i<def["fields"].length; i++) { // i=Fields
23482348
if (obj.hasChild(def['fields'][i]['id'])) {

ProtoBuf.noparse.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ProtoBuf.noparse.min.map

+2-2
Large diffs are not rendered by default.

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "protobuf",
33
"description": "Protocol Buffers for JavaScript. Finally.",
4-
"version": "2.0.4",
4+
"version": "2.0.5",
55
"main": "ProtoBuf.js",
66
"license": "Apache-2.0",
77
"homepage": "http://dcode.io/",

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "protobufjs",
3-
"version": "2.0.4",
3+
"version": "2.0.5",
44
"description": "A full-featured protobuf implementation in plain JavaScript.",
55
"author": "Daniel Wirtz <[email protected]>",
66
"contributors": [

src/ProtoBuf/Builder.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ ProtoBuf.Builder = (function(ProtoBuf, Lang, Reflect) {
327327
this.ptr.addChild(obj);
328328
obj = null;
329329
} else if (Builder.isValidExtend(def)) {
330-
obj = this.lookup(def["ref"]);
330+
obj = this.ptr.resolve(def["ref"]);
331331
if (obj) {
332332
for (i=0; i<def["fields"].length; i++) { // i=Fields
333333
if (obj.hasChild(def['fields'][i]['id'])) {

0 commit comments

Comments
 (0)