From 3f8af396f12e055c87e01da6acd391ad6a37f468 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Tue, 7 Apr 2020 18:18:34 +0200 Subject: [PATCH] Fix setting BS4 popover selector if element is a string --- bootstrap-tourist.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bootstrap-tourist.js b/bootstrap-tourist.js index b883b56..02793d5 100755 --- a/bootstrap-tourist.js +++ b/bootstrap-tourist.js @@ -1376,7 +1376,9 @@ else { // BS3 popover accepts jq object or string literal. BS4 popper.js of course doesn't, just to make life extra irritating. - popOpts.selector = "#" + step.element[0].id; + if (typeof step.element !== 'string') { + popOpts.selector = "#" + step.element[0].id; + } // Allow manual repositioning of the popover // THIS DOESN'T WORK - popper.js will only adjust on one axis even if both axis are specified...