Skip to content

Commit 7b1cb70

Browse files
imlucaskangas
authored andcommitted
INT-1659: Fix TypeError: Property 'message' must be of type string. Tried to set [object Object] (#451)
(cherry picked from commit 7dfa25a)
1 parent 7c2c2a2 commit 7b1cb70

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/app/statusbar/index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,17 @@ var StatusbarView = View.extend({
142142
this.set(options);
143143
},
144144
showMessage: function(message) {
145+
if (!message) {
146+
message = '';
147+
} else if (!_.isString(message)) {
148+
/**
149+
* @see https://jira.mongodb.org/browse/INT-1659
150+
*/
151+
message = _.get(message, 'message', JSON.stringify(message));
152+
}
153+
145154
this.visible = true;
146-
this.message = message || '';
155+
this.message = message;
147156
this.animation = false;
148157
},
149158
showSubview: function(subview) {

0 commit comments

Comments
 (0)