Renée Kooi 6 years ago
parent
commit
620e78a02c
1 changed files with 4 additions and 3 deletions
  1. 4 3
      packages/@uppy/transloadit/src/index.js

+ 4 - 3
packages/@uppy/transloadit/src/index.js

@@ -67,10 +67,11 @@ module.exports = class Transloadit extends Plugin {
     this._onRestored = this._onRestored.bind(this)
     this._getPersistentData = this._getPersistentData.bind(this)
 
-    if (this.opts.params ||
-        // No params _and_ no custom getAssemblyOptions is an early error.
-        this.opts.getAssemblyOptions === defaultOptions.getAssemblyOptions) {
+    const hasCustomAssemblyOptions = this.opts.getAssemblyOptions !== defaultOptions.getAssemblyOptions
+    if (this.opts.params) {
       AssemblyOptions.validateParams(this.opts.params)
+    } else if (!hasCustomAssemblyOptions) {
+      AssemblyOptions.validateParams(null)
     }
 
     this.client = new Client({