8000 allow for browser and node assignments for certain cases involving es… · jasonLaster/sprintf.js@da80f24 · GitHub
[go: up one dir, main page]

Skip to content

Commit da80f24

Browse files
committed
allow for browser and node assignments for certain cases involving es6, webpack, typescript
1 parent 8b14ae2 commit da80f24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sprintf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@
229229
exports.sprintf = sprintf
230230
exports.vsprintf = vsprintf
231231
}
232-
else {
232+
if (typeof window !== 'undefined') {
233233
window.sprintf = sprintf
234234
window.vsprintf = vsprintf
235235

0 commit comments

Comments
 (0)
0