bigpipe-util 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bigpipe-util",
3
3
  "description": "This library currently implements small part of Facebook BigPipe so far, but the advantage is to efficiently insert/replace content and work with the DOM. It is also possible to easily call JavaScript modules from PHP.",
4
- "version": "0.2.3",
4
+ "version": "0.2.4",
5
5
  "keywords": [
6
6
  "bigpipe",
7
7
  "xhr",
@@ -76,10 +76,8 @@ export default class Dialog {
76
76
 
77
77
  if (controller) {
78
78
  if (typeof controller === 'string') {
79
- controller = new (window.require(controller));
80
- }
81
-
82
- if (typeof controller === 'function') {
79
+ (new (window.require(controller, ...args)));
80
+ } else if (typeof controller === 'function') {
83
81
  controller(_modal, ...args);
84
82
  }
85
83
  }