remove duplicate method
This commit is contained in:
parent
23f476dbf3
commit
6ecfe7c7c3
|
@ -130,17 +130,6 @@ export class ImportNotesProcessorService {
|
|||
return typeof obj[Symbol.iterator] === 'function';
|
||||
}
|
||||
|
||||
private parseTwitterFile(str : string) : null | [{ tweet: any }] {
|
||||
const removed = str.replace(new RegExp('window\\.YTD\\.tweets\\.part0 = ', 'g'), '');
|
||||
|
||||
try {
|
||||
return JSON.parse(removed);
|
||||
} catch (error) {
|
||||
//The format is not what we expected. Either this file was tampered with or twitters exports changed
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@bindThis
|
||||
private parseTwitterFile(str : string) : { tweet: object }[] {
|
||||
const jsonStr = str.replace(/^\s*window\.YTD\.tweets\.part0\s*=\s*/, '');
|
||||
|
|
Loading…
Reference in New Issue