File tree 2 files changed +4282
-7
lines changed
2 files changed +4282
-7
lines changed Original file line number Diff line number Diff line change @@ -115,15 +115,13 @@ export class MathJaxNode_ extends React.Component<Props & MathJaxContextValue> {
115
115
setScriptText ( text : string ) {
116
116
const inline = this . props . inline ;
117
117
const type = types [ this . props . input ] ;
118
- if ( ! this . script ) {
119
- if ( this . nodeRef . current ) {
120
- this . script = document . createElement ( "script" ) ;
121
- this . script . type = `math/${ type } ; ${ inline ? "" : "mode=display" } ` ;
122
- this . nodeRef . current . appendChild ( this . script ) ;
123
- }
118
+
119
+ if ( ! this . script && this . nodeRef . current ) {
120
+ this . script = document . createElement ( "script" ) ;
121
+ this . script . type = `math/${ type } ; ${ inline ? "" : "mode=display" } ` ;
122
+ this . nodeRef . current . appendChild ( this . script ) ;
124
123
}
125
124
126
- // It _should_ be defined at this point, we'll just return at this point now
127
125
if ( ! this . script ) {
128
126
return ;
129
127
}
You can’t perform that action at this time.
0 commit comments