Skip to content

Commit

Permalink
apply suggestion
Browse files Browse the repository at this point in the history
Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>
  • Loading branch information
grafixeyehero and thornbill committed Sep 20, 2024
1 parent 1c18fa8 commit e898cc4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,16 @@ const getItemByType = async (
options?: AxiosRequestConfig
) => {
const { api, user } = apiContext;
if (!api) throw new Error('No API instance available');
if (!user?.Id) throw new Error('No User ID provided');

if (!api) {
console.warn('[getItemByType] No API instance available');
return;
}

if (!user?.Id) {
console.warn('[getItemByType] No User ID provided');
return;
}

let response;
switch (itemType) {
Expand Down
6 changes: 3 additions & 3 deletions src/strings/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -1045,8 +1045,8 @@
"MessageAreYouSureDeleteSubtitles": "Are you sure you wish to delete this subtitle file?",
"MessageAreYouSureYouWishToRemoveMediaFolder": "Are you sure you wish to remove this media folder?",
"MessageBrowsePluginCatalog": "Browse our plugin catalog to view available plugins.",
"MessageCancelSeriesTimerError": "An error occurred while cancel series timer",
"MessageCancelTimerError": "An error occurred while cancel timer",
"MessageCancelSeriesTimerError": "An error occurred while canceling the series timer",
"MessageCancelTimerError": "An error occurred while canceling the timer",
"MessageChangeRecordingPath": "Changing your recording folder will not migrate existing recordings from the old location to the new. You'll need to move them manually if desired.",
"MessageConfirmAppExit": "Do you want to exit?",
"MessageConfirmDeleteGuideProvider": "Are you sure you wish to delete this guide provider?",
Expand Down Expand Up @@ -1099,7 +1099,7 @@
"MessageRenameMediaFolder": "Renaming a media library will cause all metadata to be lost, proceed with caution.",
"MessageRepositoryInstallDisclaimer": "WARNING: Installing a third party plugin repository carries risks. It may contain unstable or malicious code, and may change at any time. Only install repositories from authors that you trust.",
"MessageSent": "Message sent.",
"MessageSplitVersionsError": "An error occurred while split versions",
"MessageSplitVersionsError": "An error occurred while splitting versions",
"MessageSyncPlayCreateGroupDenied": "Permission required to create a group.",
"MessageSyncPlayDisabled": "SyncPlay disabled.",
"MessageSyncPlayEnabled": "SyncPlay enabled.",
Expand Down

0 comments on commit e898cc4

Please sign in to comment.