Skip to content

Commit

Permalink
#344 fixing issue with delete keyword (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg Andreyev authored and kvz committed Aug 24, 2017
1 parent db25b54 commit 59f0e73
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/php/array/array_multisort.js
@@ -1,6 +1,7 @@
module.exports = function array_multisort (arr) { // eslint-disable-line camelcase
// discuss at: http://locutus.io/php/array_multisort/
// original by: Theriault (https://github.com/Theriault)
// improved by: Oleg Andreyev (https://github.com/oleg-andreyev)
// example 1: array_multisort([1, 2, 1, 2, 1, 2], [1, 2, 3, 4, 5, 6])
// returns 1: true
// example 2: var $characters = {A: 'Edward', B: 'Locke', C: 'Sabin', D: 'Terra', E: 'Edward'}
Expand Down Expand Up @@ -182,8 +183,8 @@ module.exports = function array_multisort (arr) { // eslint-disable-line camelca
args[i][vkey] = sortArrs[i][j]
}
}
delete sortArrs[i]
delete sortKeys[i]
sortArrs.splice(i, 1)
sortKeys.splice(i, 1)
continue
}

Expand Down Expand Up @@ -294,8 +295,8 @@ module.exports = function array_multisort (arr) { // eslint-disable-line camelca
args[i][vkey] = sortArrs[i][j]
}
}
delete sortArrs[i]
delete sortKeys[i]
sortArrs.splice(i, 1)
sortKeys.splice(i, 1)
}
}
return true
Expand Down

0 comments on commit 59f0e73

Please sign in to comment.