From 4163b21746ff150c32551e58ceffa09e28e2e404 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Fri, 15 Mar 2013 02:32:05 +0000 Subject: [PATCH] Wrap self.run in an anonymous function wrapper so self always gets the same scope. props azaozz. fixes #23780 git-svn-id: https://develop.svn.wordpress.org/trunk@23703 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/js/autosave.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/js/autosave.js b/wp-includes/js/autosave.js index 537d9b6aac..b71a02bc61 100644 --- a/wp-includes/js/autosave.js +++ b/wp-includes/js/autosave.js @@ -511,7 +511,7 @@ wp.autosave.local = { this.blog_id = typeof window.autosaveL10n != 'undefined' ? window.autosaveL10n.blog_id : 0; this.checkPost(); - $(document).ready( self.run ); + $(document).ready( function(){ self.run(); } ); }, // Run on DOM ready