From 6704d772e27e36e576ad75b7f80ecef94a095a09 Mon Sep 17 00:00:00 2001 From: Klemek Date: Thu, 17 Feb 2022 14:15:34 +0100 Subject: [PATCH] bugfix --- index.html | 4 ++-- main.js | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index c56debd..94219a4 100644 --- a/index.html +++ b/index.html @@ -34,14 +34,14 @@
-

List {{showConfig ? '▼' : '▲'}}

+

{{showConfig ? '▾' : '▸'}} List ({{ available.length }})

- + diff --git a/main.js b/main.js index 18664de..b62f771 100644 --- a/main.js +++ b/main.js @@ -32,6 +32,9 @@ const utils = { }, shuffle: function (array) { const output = [...array]; + if (output.length < 2) { + return output; + } for (let i = 0; i < array.length; i++) { const i1 = this.randindex(array); const i2 = this.randindex(array, i1); @@ -62,6 +65,9 @@ let app = { currentYear() { return new Date().getFullYear(); }, + urlLength() { + return window.location.toString().length; + }, }, methods: { showApp() {