File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change 22 // jQuery is optional. Use it to support legacy browsers.
33 var $ = ( typeof window . jQuery !== 'undefined' ) && window . jQuery ;
44
5- // Get the constructor for a className
6- // Not a part of the public API
7- function getConstructor ( className ) {
8- // Assume className is simple and can be found at top-level (window).
9- // Fallback to eval to handle cases like 'My.React.ComponentName'.
10- // Also, try to gracefully import Babel 6 style default exports
11- //
12- var constructor ;
13-
14- // Try to access the class globally first
15- constructor = window [ className ] ;
16-
17- // If that didn't work, try eval
18- if ( ! constructor ) {
19- constructor = eval . call ( window , className ) ;
20- }
21-
22- // Lastly, if there is a default attribute try that
23- if ( constructor && constructor . default ) {
24- constructor = constructor . default ;
25- }
26-
27- return constructor ;
28- }
29-
305 window . ReactRailsUJS = {
316 // This attribute holds the name of component which should be mounted
327 // example: `data-react-class="MyApp.Items.EditForm"`
You can’t perform that action at this time.
0 commit comments