diff --git a/lib/utils/common.js b/lib/utils/common.js index 88665d0..3b5f3a5 100644 --- a/lib/utils/common.js +++ b/lib/utils/common.js @@ -97,15 +97,7 @@ class common extends utils { * @returns {Array} */ static uniqueList (list) { - let tmp = {} - let r = [] - for (let i = 0; i < list.length; i++) { - tmp[list[i]] = list[i] - } - for (let i in tmp) { - r.push(tmp[i]) - } - return r + return list.filter((v, i, a) => a.indexOf(v) === i) } /**