keyboard: Fix fallback layout when using variants

Commit c1ec7b2ff meant to fall back to the base layout in case
a variant like `fr+oss` is set up, but as we are checking for
'+' on the array rather than the layout name, the fallback only
"works" for a layout that is literally called '+', whoops.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2471


(cherry picked from commit d29e5765ba)
This commit is contained in:
Florian Müllner 2020-03-23 15:14:47 +00:00 committed by Florian Müllner
parent 0a50b6ea01
commit 3d7ee7856f

View File

@ -467,7 +467,7 @@ Signals.addSignalMethods(Key.prototype);
var KeyboardModel = class {
constructor(groupName) {
let names = [groupName];
if (names.includes('+'))
if (groupName.includes('+'))
names.push(groupName.replace(/\+.*/, ''));
names.push('us');