mirror of
https://github.com/LanceGin/jsotp.git
synced 2026-04-17 00:01:31 +08:00
fix: Util.arr_rjust error
This commit is contained in:
+2
-2
@@ -44,8 +44,8 @@ export class Util {
|
|||||||
* @return {BYTES}
|
* @return {BYTES}
|
||||||
*/
|
*/
|
||||||
static arr_rjust(arr, n) {
|
static arr_rjust(arr, n) {
|
||||||
if (0 <= arr.lenth) {
|
if (n <= arr.length) {
|
||||||
arr = arr.splice(arr.lenth - 1 - n);
|
arr = arr.splice(arr.length - 1 - n);
|
||||||
return arr;
|
return arr;
|
||||||
} else {
|
} else {
|
||||||
let diff = n - arr.length;
|
let diff = n - arr.length;
|
||||||
|
|||||||
Reference in New Issue
Block a user