Skip to content

Commit 9f6d924

Browse files
committed
Effects: Refactor transfer back compat to avoid bad nested return
Download builder replaces return statements while concatenating a bundle, but fails to deal with this nested return. Since this module is already deprecated, pulling the return to the top level makes more sense.
1 parent 15586ea commit 9f6d924

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ui/effects/effect-transfer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@
2929
}
3030
}( function( $ ) {
3131

32+
var effect;
3233
if ( $.uiBackCompat !== false ) {
33-
return $.effects.define( "transfer", function( options, done ) {
34+
effect = $.effects.define( "transfer", function( options, done ) {
3435
$( this ).transfer( options, done );
3536
} );
3637
}
38+
return effect;
3739

3840
} ) );

0 commit comments

Comments
 (0)