File tree Expand file tree Collapse file tree
libs/web-common/src/components
webapp/wdkCustomization/js/client/components/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ interface RecordTableProps {
3535interface RowData {
3636 source_id : string ;
3737 assay_type : string ;
38- module : string ;
38+ module : string | null ;
3939 paralog_number : number ;
4040 graph_ids : string ;
4141 dataset_id : string ;
@@ -340,7 +340,7 @@ const DatasetGraph: React.FC<DatasetGraphProps> = ({
340340 const specialImgUrl =
341341 dataTable && dataTable . record . attributes . specialJbrowseUrl ;
342342
343- const isUserDataset = module . startsWith ( 'UserDatasets' ) ;
343+ const isUserDataset = module ? .startsWith ( 'UserDatasets' ) ?? false ;
344344
345345 const dataset_link = makeDatasetUrl ( rowData , isUserDataset ) ;
346346 const tutorial_link = makeTutorialUrl ( ) ;
Original file line number Diff line number Diff line change 6969 "file-loader" : " ^3.0.1" ,
7070 "html-webpack-plugin" : " ^4.5.2" ,
7171 "ify-loader" : " ^1.1.0" ,
72+ "imports-loader" : " ^1.1.1" ,
7273 "jquery" : " 1.9.1" ,
7374 "js-cookie" : " ^2.2.0" ,
7475 "mini-css-extract-plugin" : " ^2.7.6" ,
Original file line number Diff line number Diff line change @@ -14,7 +14,12 @@ export function loadChemDoodleWeb() {
1414 return new Promise ( function ( resolve , reject ) {
1515 try {
1616 require . ensure ( [ ] , function ( require ) {
17- require ( '!!script-loader!site/js/ChemDoodleWeb' ) ;
17+ // ChemDoodleWeb.js is a UMD module. When loaded via script-loader,
18+ // webpack's module-scope `exports` leaks into the eval scope and
19+ // the UMD wrapper picks the CommonJS branch, then throws on the
20+ // undefined `module`. Shadow both so the UMD falls through to the
21+ // browser-global branch that actually registers readMOL et al.
22+ require ( '!!script-loader!imports-loader?additionalCode=var%20exports%3Dundefined%3Bvar%20module%3Dundefined%3B!site/js/ChemDoodleWeb' ) ;
1823 resolve ( ChemDoodle ) ;
1924 } ) ;
2025 } catch ( err ) {
Original file line number Diff line number Diff line change @@ -8805,6 +8805,7 @@ __metadata:
88058805 file-loader: "npm:^3.0.1"
88068806 html-webpack-plugin: "npm:^4.5.2"
88078807 ify-loader: "npm:^1.1.0"
8808+ imports-loader: "npm:^1.1.1"
88088809 jquery: "npm:1.9.1"
88098810 js-cookie: "npm:^2.2.0"
88108811 mini-css-extract-plugin: "npm:^2.7.6"
You can’t perform that action at this time.
0 commit comments