Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
Merge pull request #34 from cezary/master
Browse files Browse the repository at this point in the history
Fixes #18 'window is not defined' in NodeJS
  • Loading branch information
Keita Fujii committed Feb 7, 2012
2 parents 17d9503 + fbfa72e commit 307017a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion twitter-text.js
@@ -1,6 +1,12 @@
if (!window.twttr) {
if (typeof window === "undefined" || window === null) {
window = { twttr: {} };
}
if (window.twttr == null) {
window.twttr = {};
}
if (typeof twttr === "undefined" || twttr === null) {
twttr = {};
}

(function() {
twttr.txt = {};
Expand Down

0 comments on commit 307017a

Please sign in to comment.