From 16498ad3c36a83535d185a26ea3858573f1e7bc6 Mon Sep 17 00:00:00 2001 From: Francisco Hodge Date: Sat, 9 May 2020 15:36:05 -0400 Subject: [PATCH] Adjusting rowDOMContainer check --- src/lib/components/Keyboard.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lib/components/Keyboard.js b/src/lib/components/Keyboard.js index 1f201603..99b56b4f 100644 --- a/src/lib/components/Keyboard.js +++ b/src/lib/components/Keyboard.js @@ -1285,12 +1285,15 @@ class SimpleKeyboard { */ const buttonHasContainerStart = !disableRowButtonContainers && - button.includes("[") && - button.length > 1; + typeof button === "string" && + button.length > 1 && + button.indexOf("[") === 0; + const buttonHasContainerEnd = !disableRowButtonContainers && - button.includes("]") && - button.length > 1; + typeof button === "string" && + button.length > 1 && + button.indexOf("]") === button.length - 1; /** * Save container start index, if applicable