Skip to content

Commit 4982133

Browse files
committed
fix:Invalid picker when unformatted fromSources supplied
1 parent 83e7cab commit 4982133

File tree

2 files changed

+30
-33
lines changed

2 files changed

+30
-33
lines changed

.github/workflows/deploy_beta.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: filestack-js-beta
22
on:
33
push:
4-
branches: [ sc-add-alt-text ]
4+
branches: [ develop, hotfix/* ]
55
jobs:
66
build:
77
runs-on: ubuntu-latest

src/schema/picker.schema.ts

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -57,38 +57,35 @@ export const PickerParamsSchema = {
5757
},
5858
fromSources: {
5959
type: 'array',
60-
items: {
61-
anyOf: [
62-
{
63-
type: 'string',
64-
enum: [
65-
'local_file_system',
66-
'url',
67-
'imagesearch',
68-
'facebook',
69-
'instagram',
70-
'googledrive',
71-
'unsplash',
72-
'dropbox',
73-
'webcam',
74-
'video',
75-
'audio',
76-
'box',
77-
'github',
78-
'gmail',
79-
'googlephotos',
80-
'onedrive',
81-
'onedriveforbusiness',
82-
'clouddrive',
83-
'customsource',
84-
'tint',
85-
],
86-
},
87-
{
88-
type: 'object',
89-
},
90-
],
91-
},
60+
items: [
61+
{
62+
type: ['string', 'object'],
63+
additionalProperties: false,
64+
enum: [
65+
'local_file_system',
66+
'url',
67+
'imagesearch',
68+
'facebook',
69+
'instagram',
70+
'googledrive',
71+
'unsplash',
72+
'dropbox',
73+
'webcam',
74+
'video',
75+
'audio',
76+
'box',
77+
'github',
78+
'gmail',
79+
'googlephotos',
80+
'onedrive',
81+
'onedriveforbusiness',
82+
'clouddrive',
83+
'googlephotos',
84+
'customsource',
85+
'tint',
86+
],
87+
},
88+
],
9289
},
9390
container: {
9491
format: 'HTMLContainer',

0 commit comments

Comments
 (0)