File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ export function createExecutionScope(context: TypeCellContext<any>) {
88
88
89
89
export function getModulesFromTypeCellCode ( compiledCode : string , scope : any ) {
90
90
// Checks if define([], function) like code is already present
91
- if ( ! compiledCode . match ( / ^ \s + ( d e f i n e \( ( " .* " , ) ? \[ .* \] , ) f u n c t i o n / gm) ) {
91
+ if ( ! compiledCode . match ( / ( d e f i n e \( ( " .* " , ) ? \[ .* \] , ) f u n c t i o n / gm) ) {
92
92
// file is not a module (no exports). Create module-like code manually
93
93
compiledCode = `define([], function() { ${ compiledCode } ; });` ;
94
94
}
Original file line number Diff line number Diff line change @@ -45,6 +45,5 @@ export function toAMDFormat(code: string) {
45
45
}
46
46
47
47
export function buildMockedModel ( name : string , code : string ) {
48
- const umdFormat = toAMDFormat ( code ) ;
49
- return new CodeModelMock ( "javascript" , name , umdFormat ) ;
48
+ return new CodeModelMock ( "javascript" , name , toAMDFormat ( code ) ) ;
50
49
}
You can’t perform that action at this time.
0 commit comments