We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 799f0b1 commit b4f88afCopy full SHA for b4f88af
1 file changed
index.js
@@ -107,7 +107,8 @@ PythonShell.defaultOptions = {};
107
// built-in formatters
108
PythonShell.format = {
109
text: function toText(data) {
110
- if (typeof data !== 'string') return data.toString();
+ if (!data) return '';
111
+ else if (typeof data !== 'string') return data.toString();
112
return data;
113
},
114
json: function toJson(data) {
0 commit comments