Browse Source

change for loop for foreach

pull/122/head
Diana Shkolnikov 10 years ago
parent
commit
ed0b5113d5
  1. 6
      helper/geojsonify.js

6
helper/geojsonify.js

@ -77,13 +77,11 @@ function search( docs, params ){
* @param {object} dest * @param {object} dest
*/ */
function copyProperties( source, props, dest ) { function copyProperties( source, props, dest ) {
var count = props.length; props.forEach( function ( prop ) {
for ( var i = 0; i < count; i++ ) {
var prop = props[i];
if ( source.hasOwnProperty( prop ) ) { if ( source.hasOwnProperty( prop ) ) {
dest[prop] = source[prop]; dest[prop] = source[prop];
} }
} });
} }

Loading…
Cancel
Save