Procházet zdrojové kódy

Merge pull request #19459 from DefinitelyMaybe/src/polyfills

ES6 (let&const): src/polyfills
Mr.doob před 5 roky
rodič
revize
a84b7df5b5
1 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 4 4
      src/polyfills.js

+ 4 - 4
src/polyfills.js

@@ -65,15 +65,15 @@ if ( Object.assign === undefined ) {
 
 		}
 
-		var output = Object( target );
+		const output = Object( target );
 
-		for ( var index = 1; index < arguments.length; index ++ ) {
+		for ( let index = 1; index < arguments.length; index ++ ) {
 
-			var source = arguments[ index ];
+			const source = arguments[ index ];
 
 			if ( source !== undefined && source !== null ) {
 
-				for ( var nextKey in source ) {
+				for ( const nextKey in source ) {
 
 					if ( Object.prototype.hasOwnProperty.call( source, nextKey ) ) {