Skip to content

Commit

Permalink
This patch prevents double inclusion of the Submitter.js file. That
Browse files Browse the repository at this point in the history
was causing a race condition that made random events to get lose along
the way. Thank a million to Ivan, Jonathan and Jedrzej for the helping
me to debug this (pesky) issue. You guys rock!

git-svn-id: svn://cherokee-project.com/CTK/trunk@5069 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information
alobbs committed May 10, 2010
1 parent f3b4059 commit 48c9747
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions static/js/Submitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
* 02110-1301, USA.
*/

;(function($) {
// Workaround to prevent double inclussion
if ((typeof submitter_loaded) == 'undefined') {
submitter_loaded = true;

;(function($) {
var Submitter = function (element, url, optional) {
var optional_str = optional;
var key_pressed = false;
Expand Down Expand Up @@ -227,6 +231,8 @@
});
};

})(jQuery);
})(jQuery);

} // Double inclusion

// REF: http://www.virgentech.com/code/view/id/3

0 comments on commit 48c9747

Please sign in to comment.