Hi,
as soon I switch the "Layout Color" from the config.xhtml I got an JS error:
"layout.js.jsf?ln=rain-layout:546 Uncaught TypeError: Cannot read properties of undefined (reading 'indexOf')
at Object.changePrimaryColor (layout.js.jsf?ln=rain-layout:546:27)"
If I refresh the page, the layout has been changed correctly..
Any idea?
Issue in Object.changePrimaryColor in layout.js
Forum rules
Please note that response time for technical support is within 3-5 business days.
Please note that response time for technical support is within 3-5 business days.
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Do you have a link element that contains layout styles? Could you please check it in DOM? For now, you can add a null check to href variable. I'll add it too.
Code: Select all
changePrimaryColor: function(newColor, darkMode) {
newLayout = this.getColor(newColor, darkMode);
var linkElement = $('link[href*="layout-"]');
var href = linkElement.attr('href');
if (href) {
var startIndexOf = href.indexOf('layout-') + 7;
var endIndexOf = href.indexOf('.css');
var currentColor = href.substring(startIndexOf, endIndexOf);
this.replaceLink(linkElement, href.replace(currentColor, newLayout));
}
},
Github Profile: https://github.com/mertsincan
By interacting with a diverse range of words and honing their word-guessing skills, players can enhance their language fluenc y https://mywordle.net/wordle-italiano-il ... 3-lettere/. This can lead to improved speaking, writing, and comprehension abilities in their native language.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 12 guests