File tree Expand file tree Collapse file tree 1 file changed +18
-10
lines changed Expand file tree Collapse file tree 1 file changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -244,23 +244,31 @@ export function patchForNode16() {
244244 if ( String . prototype . toWellFormed === undefined ) {
245245 // eslint-disable-next-line @typescript-eslint/ban-ts-comment
246246 // @ts -ignore
247- String . prototype . toWellFormed = function ( ) {
248- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
249- // @ts -ignore
250- return toUSVString ( this ) ;
251- } ;
247+ Object . defineProperty ( String . prototype , 'toWellFormed' , {
248+ value : function ( ) {
249+ return toUSVString ( this ) ;
250+ } ,
251+ enumerable : false ,
252+ configurable : true ,
253+ writable : true ,
254+ } )
252255 }
253256
254257 // eslint-disable-next-line @typescript-eslint/ban-ts-comment
255258 // @ts -ignore
256259 if ( String . prototype . isWellFormed === undefined ) {
257260 // eslint-disable-next-line @typescript-eslint/ban-ts-comment
258261 // @ts -ignore
259- String . prototype . isWellFormed = function ( ) {
260- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
261- // @ts -ignore
262- return toUSVString ( this ) === this ;
263- } ;
262+ Object . defineProperty ( String . prototype , 'isWellFormed' , {
263+ value : function ( ) {
264+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
265+ // @ts -ignore
266+ return toUSVString ( this ) === this ;
267+ } ,
268+ enumerable : false ,
269+ configurable : true ,
270+ writable : true ,
271+ } ) ;
264272 }
265273
266274}
You can’t perform that action at this time.
0 commit comments