File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,9 @@ export async function importFile(
133133 // If flags === 1, putDoc returns new Storage definitions and the file must be a CLS
134134 const oldContent = new TextDecoder ( "utf-8" ) . decode ( await vscode . workspace . fs . readFile ( file . uri ) ) ;
135135 const oldContentArray = oldContent . split ( / \r ? \n / ) ;
136- const storage = Buffer . isBuffer ( data . result . content ) ? new TextDecoder ( ) . decode ( data . result . content ) . split ( / \r ? \n / g) : data . result . content ;
136+ const storage = Buffer . isBuffer ( data . result . content )
137+ ? new TextDecoder ( ) . decode ( data . result . content ) . split ( / \r ? \n / g)
138+ : data . result . content ;
137139 const newContentArray = updateStorage ( oldContentArray , storage ) ;
138140 if ( oldContentArray . some ( ( oldLine , index ) => oldLine !== newContentArray [ index ] ) ) {
139141 const EOL = ( ( < CurrentTextFile > file ) ?. eol ?? vscode . EndOfLine . LF ) == vscode . EndOfLine . CRLF ? "\r\n" : "\n" ;
You can’t perform that action at this time.
0 commit comments