Permalink
Browse files

Prevent quota exceeded - which is causing Snapbird to bork :-\

  • Loading branch information...
1 parent 1f6de64 commit 3dae5a87d5a31e6996ca91f24a7146975a91916d @remy remy committed Apr 4, 2011
Showing with 8 additions and 4 deletions.
  1. +7 −3 twitterlib.js
  2. +1 −1 twitterlib.min.js
View
@@ -342,9 +342,13 @@
}
if (caching && options.page > 1) {
- sessionStorage.setItem(twitterlib + '.page' + options.page, 'true');
- sessionStorage.setItem(twitterlib + '.page' + options.page + '.tweets', JSON.stringify(tweets));
- sessionStorage.setItem(twitterlib + '.page' + options.page + '.originalTweets', JSON.stringify(options.originalTweets));
+ try {
+ sessionStorage.setItem(twitterlib + '.page' + options.page, 'true');
+ sessionStorage.setItem(twitterlib + '.page' + options.page + '.tweets', JSON.stringify(tweets));
+ sessionStorage.setItem(twitterlib + '.page' + options.page + '.originalTweets', JSON.stringify(options.originalTweets));
+ } catch (e) {
+ // possible QUOTA EXCEEDED
+ }
}
options.cached = false;
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 3dae5a8

Please sign in to comment.