File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -2236,15 +2236,13 @@ window.CodeMirror = (function() {
22362236 if ( textarea . form ) {
22372237 // Deplorable hack to make the submit method do the right thing.
22382238 var rmSubmit = connect ( textarea . form , "submit" , save , true ) ;
2239- if ( typeof textarea . form . submit == "function" ) {
2240- var realSubmit = textarea . form . submit ;
2241- textarea . form . submit = function wrappedSubmit ( ) {
2242- save ( ) ;
2243- textarea . form . submit = realSubmit ;
2244- textarea . form . submit ( ) ;
2245- textarea . form . submit = wrappedSubmit ;
2246- } ;
2247- }
2239+ var realSubmit = textarea . form . submit ;
2240+ textarea . form . submit = function wrappedSubmit ( ) {
2241+ save ( ) ;
2242+ textarea . form . submit = realSubmit ;
2243+ textarea . form . submit ( ) ;
2244+ textarea . form . submit = wrappedSubmit ;
2245+ } ;
22482246 }
22492247
22502248 textarea . style . display = "none" ;
You can’t perform that action at this time.
0 commit comments