1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fix require

This commit is contained in:
MrTimscampi 2020-08-06 22:48:26 +02:00
parent 936ff4186d
commit 453079fe06
3 changed files with 6 additions and 7 deletions

View file

@ -3,7 +3,6 @@ import dom from 'dom';
import 'scrollStyles';
function getBoundingClientRect(elem) {
// Support: BlackBerry 5, iOS 3 (original iPhone)
// If we don't have gBCR, just use 0,0 rather than error
if (elem.getBoundingClientRect) {
@ -14,7 +13,6 @@ function getBoundingClientRect(elem) {
}
export function getPosition(scrollContainer, item, horizontal) {
const slideeOffset = getBoundingClientRect(scrollContainer);
const itemOffset = getBoundingClientRect(item);
@ -130,7 +128,7 @@ export const centerFocus = {
});
}
}
}
};
export default {
getPosition: getPosition,

View file

@ -15,12 +15,12 @@ function notifyApp() {
function displayMessage(cmd) {
const args = cmd.Arguments;
if (args.TimeoutMs) {
require(['toast'], function (toast) {
import('toast').then((toast) => {
toast({ title: args.Header, text: args.Text });
});
} else {
require(['alert'], function (alert) {
alert.default({ title: args.Header, text: args.Text });
import('alert').then((alert) => {
alert({ title: args.Header, text: args.Text });
});
}
}