dev-ext / twitterjs

Automatically exported from code.google.com/p/twitterjs
MIT License
0 stars 0 forks source link

If twitterlib already loaded, twitterjs still uses external link #30

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use twitterjs with defaults in demo.
2. Also load twitterlib locally, before calling twitterjs file.
3. Twitterjs still tries to load twitterlib from github.

Here's my fix: 
Line 224: if (typeof twitterlib !== 'function') { // # Replace 'function' with 
'object'

Original issue reported on code.google.com by quan...@gmail.com on 7 Dec 2011 at 7:18

GoogleCodeExporter commented 9 years ago
Fixed that too - would love too see this repo on github to participate ;-).

my solution:

check if the variable is defined in line 224 instead of checking if it's an 
Object (it's a function indeed):

      if (typeof twitterlib === 'undefined') { ...

Original comment by sven.kra...@googlemail.com on 22 Jan 2012 at 5:24