File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 2020 * along with this program. If not, see <https://www.gnu.org/licenses/>.
2121 */
2222
23- const fs = require ( "fs" ) ;
24- const path = require ( "path" ) ;
25-
26- // Load the ReflectionMatrix class by reading the source and evaluating it
27- const source = fs . readFileSync ( path . resolve ( __dirname , "../reflection.js" ) , "utf-8" ) ;
28- // We put ReflectionMatrix in global scope
29- new Function (
30- source + "\nif (typeof global !== 'undefined') { global.ReflectionMatrix = ReflectionMatrix; }"
31- ) ( ) ;
23+ const ReflectionMatrix = require ( "../reflection" ) ;
3224
3325// Mock globals
3426global . _ = str => str ;
Original file line number Diff line number Diff line change @@ -707,3 +707,6 @@ class ReflectionMatrix {
707707 return this . sanitizeHTML ( html ) ;
708708 }
709709}
710+ if ( typeof module !== "undefined" && module . exports ) {
711+ module . exports = ReflectionMatrix ;
712+ }
You can’t perform that action at this time.
0 commit comments