Skip to content

Commit

Permalink
fix debug.dump
Browse files Browse the repository at this point in the history
  • Loading branch information
seishun committed Jul 20, 2016
1 parent e4b129f commit 73e0b49
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ jspb.debug.dump_ = function(thing) {
var match = /^get([A-Z]\w*)/.exec(name);
if (match && name != 'getExtension' &&
name != 'getJsPbMessageId') {
var val = thing[name]();
if (val != null) {
var has = 'has' + match[1];
if (!thing[has] || thing[has]())
{
var val = thing[name]();
object[jspb.debug.formatFieldName_(match[1])] = jspb.debug.dump_(val);
}
}
Expand Down

0 comments on commit 73e0b49

Please sign in to comment.