Skip to content
Snippets Groups Projects
Commit 95ff77ce authored by Maxime's avatar Maxime
Browse files

bugfix: issue on firefox first load #13

parent 7d0de006
No related branches found
No related tags found
1 merge request!21bugfix: issue on firefox first load #13
......@@ -72,7 +72,8 @@ function firstLoad(){
for (let i = 0; i < pageTitle.length; i++){
//if to deal with error
if(pageTitle[i] == "" || null || undefined){
console.log("the title is",pageTitle);
if(!pageTitle[i]){
console.log("there's no page title");
}
else{
......@@ -87,6 +88,7 @@ function firstLoad(){
push it to the poll option data range
push it to the total polls data-src
*/
console.log("setting the poll options",dataSourceDomain);
setCurrentPollOptions(dataSourceDomain,pollPage,pollId);
setTotalResultId(dataSourceDomain,pollPage,pollId);
}
......@@ -113,6 +115,7 @@ function firstLoad(){
//add the poll option number within the URL of the options
//get the form block
const formContent = currentPage.querySelector("[id=poll-votes-form]");
console.log("form is",formContent);
if(formContent == null){
throw "there's no formContent with the id poll-votes-form";
}
......@@ -121,6 +124,8 @@ function firstLoad(){
const newOptionRange = dataSourceDomain+"/polls/"+currentId+"/pollOptions/";
//push new
formContent.setAttribute('range-chosenoption',newOptionRange);
console.log("form is now",formContent);
formContent.dataset.src += "?" + Math.random();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment