Skip to content

Commit e6c52f7

Browse files
committed
Use opts.id as the plugin ID for all plugins, fixes #1674
1 parent a808b1d commit e6c52f7

File tree

15 files changed

+15
-15
lines changed

15 files changed

+15
-15
lines changed

packages/@uppy/aws-s3-multipart/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ module.exports = class AwsS3Multipart extends Plugin {
3939
constructor (uppy, opts) {
4040
super(uppy, opts)
4141
this.type = 'uploader'
42-
this.id = 'AwsS3Multipart'
42+
this.id = this.opts.id || 'AwsS3Multipart'
4343
this.title = 'AWS S3 Multipart'
4444
this.client = new RequestClient(uppy, opts)
4545

packages/@uppy/aws-s3/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module.exports = class AwsS3 extends Plugin {
3333
constructor (uppy, opts) {
3434
super(uppy, opts)
3535
this.type = 'uploader'
36-
this.id = 'AwsS3'
36+
this.id = this.opts.id || 'AwsS3'
3737
this.title = 'AWS S3'
3838

3939
this.defaultLocale = {

packages/@uppy/form/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = class Form extends Plugin {
1414
constructor (uppy, opts) {
1515
super(uppy, opts)
1616
this.type = 'acquirer'
17-
this.id = 'Form'
17+
this.id = this.opts.id || 'Form'
1818
this.title = 'Form'
1919

2020
// set default options

packages/@uppy/golden-retriever/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = class GoldenRetriever extends Plugin {
1616
constructor (uppy, opts) {
1717
super(uppy, opts)
1818
this.type = 'debugger'
19-
this.id = 'GoldenRetriever'
19+
this.id = this.opts.id || 'GoldenRetriever'
2020
this.title = 'Golden Retriever'
2121

2222
const defaultOptions = {

packages/@uppy/react/src/__mocks__/DashboardPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = class Dashboard extends Plugin {
44
constructor (uppy, opts) {
55
super(uppy, opts)
66

7-
this.id = opts.id
7+
this.id = this.opts.id
88
this.type = 'orchestrator'
99
}
1010

packages/@uppy/react/src/__mocks__/DragDropPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = class DragDrop extends Plugin {
44
constructor (uppy, opts) {
55
super(uppy, opts)
66

7-
this.id = opts.id
7+
this.id = this.opts.id
88
this.type = 'acquirer'
99
}
1010

packages/@uppy/react/src/__mocks__/ProgressBarPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = class ProgressBar extends Plugin {
44
constructor (uppy, opts) {
55
super(uppy, opts)
66

7-
this.id = opts.id
7+
this.id = this.opts.id
88
this.type = 'progressindicator'
99
}
1010

packages/@uppy/react/src/__mocks__/StatusBarPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = class StatusBar extends Plugin {
44
constructor (uppy, opts) {
55
super(uppy, opts)
66

7-
this.id = opts.id
7+
this.id = this.opts.id
88
this.type = 'progressindicator'
99
}
1010

packages/@uppy/redux-dev-tools/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = class ReduxDevTools extends Plugin {
1212
constructor (uppy, opts) {
1313
super(uppy, opts)
1414
this.type = 'debugger'
15-
this.id = 'ReduxDevTools'
15+
this.id = this.opts.id || 'ReduxDevTools'
1616
this.title = 'Redux DevTools'
1717

1818
// set default options

packages/@uppy/robodog/src/AttachFileInputs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class AttachFileInputs extends Plugin {
99
constructor (uppy, opts) {
1010
super(uppy, opts)
1111

12-
this.id = opts.id || 'AttachFileInputs'
12+
this.id = this.opts.id || 'AttachFileInputs'
1313
this.type = 'acquirer'
1414

1515
this.handleChange = this.handleChange.bind(this)

0 commit comments

Comments
 (0)