зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1842869 - Fix lint failure on MultiSelect.jsx, FeatureCalloutBroker.sys.mjs CLOSED TREE
This commit is contained in:
Родитель
447231b270
Коммит
19fa85f1e4
|
@ -1379,7 +1379,10 @@ const MULTI_SELECT_STYLES = [..._MSLocalized__WEBPACK_IMPORTED_MODULE_1__.CONFIG
|
|||
const MULTI_SELECT_ICON_STYLES = [..._MSLocalized__WEBPACK_IMPORTED_MODULE_1__.CONFIGURABLE_STYLES, "width", "height", "background", "backgroundColor", "backgroundImage", "backgroundSize", "backgroundPosition", "backgroundRepeat", "backgroundOrigin", "backgroundClip", "border", "borderRadius", "appearance", "fill", "stroke", "outline", "outlineOffset", "boxShadow"];
|
||||
|
||||
function getValidStyle(style, validStyles, allowVars) {
|
||||
if (!style) return null;
|
||||
if (!style) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Object.keys(style).filter(key => validStyles.includes(key) || allowVars && key.startsWith("--")).reduce((obj, key) => {
|
||||
obj[key] = style[key];
|
||||
return obj;
|
||||
|
|
|
@ -40,7 +40,9 @@ const MULTI_SELECT_ICON_STYLES = [
|
|||
];
|
||||
|
||||
function getValidStyle(style, validStyles, allowVars) {
|
||||
if (!style) return null;
|
||||
if (!style) {
|
||||
return null;
|
||||
}
|
||||
return Object.keys(style)
|
||||
.filter(
|
||||
key => validStyles.includes(key) || (allowVars && key.startsWith("--"))
|
||||
|
|
|
@ -180,7 +180,9 @@ export class _FeatureCalloutBroker {
|
|||
switch (event) {
|
||||
case "end":
|
||||
const item = this.#calloutMap.get(win);
|
||||
if (item) item.showing = false;
|
||||
if (item) {
|
||||
item.showing = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче