Skip to content

Commit 992c470

Browse files
committed
Guard another use of the node.js-specific process global
1 parent 5ff5b4f commit 992c470

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lib/MagicPen.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function MagicPen(options) {
3737
Object.keys(MagicPen.serializers).forEach(function (serializerName) {
3838
this._themes[serializerName] = { styles: {} };
3939
}, this);
40-
this.preferredWidth = (!process.browser && process.stdout.columns) || 80;
40+
this.preferredWidth = (typeof process !== 'undefined' && !process.browser && process.stdout.columns) || 80;
4141
if (options.format) {
4242
this.format = options.format;
4343
}

0 commit comments

Comments
 (0)