forked from MapComplete/MapComplete
		
	Chore: housekeeping
This commit is contained in:
		
							parent
							
								
									18e3e6f806
								
							
						
					
					
						commit
						a3a7e74f56
					
				
					 94 changed files with 1273 additions and 1080 deletions
				
			
		|  | @ -55,7 +55,7 @@ export class Changes { | |||
|             featureSwitches?: FeatureSwitchState | ||||
|         }, | ||||
|         leftRightSensitive: boolean = false, | ||||
|         reportError?: (string: string | Error) => void, | ||||
|         reportError?: (string: string | Error) => void | ||||
|     ) { | ||||
|         this._leftRightSensitive = leftRightSensitive | ||||
|         // We keep track of all changes just as well
 | ||||
|  | @ -70,7 +70,7 @@ export class Changes { | |||
|             state.osmConnection, | ||||
|             state.featurePropertiesStore, | ||||
|             this, | ||||
|             e => this._reportError(e) | ||||
|             (e) => this._reportError(e) | ||||
|         ) | ||||
|         this.historicalUserLocations = state.historicalUserLocations | ||||
| 
 | ||||
|  | @ -523,9 +523,13 @@ export class Changes { | |||
|                     const osmObj = await downloader.DownloadObjectAsync(id, 0) | ||||
|                     return { id, osmObj } | ||||
|                 } catch (e) { | ||||
|                     this._reportError( "Could not download OSM-object"+ | ||||
|                         id+ | ||||
|                         " dropping it from the changes (" + e + ")") | ||||
|                     this._reportError( | ||||
|                         "Could not download OSM-object" + | ||||
|                             id + | ||||
|                             " dropping it from the changes (" + | ||||
|                             e + | ||||
|                             ")" | ||||
|                     ) | ||||
|                     console.error( | ||||
|                         "Could not download OSM-object", | ||||
|                         id, | ||||
|  |  | |||
|  | @ -26,7 +26,7 @@ export class ChangesetHandler { | |||
|      * @private | ||||
|      */ | ||||
|     private readonly _remappings = new Map<string, string>() | ||||
|     private readonly _reportError: (e: (string | Error)) => void | ||||
|     private readonly _reportError: (e: string | Error) => void | ||||
| 
 | ||||
|     constructor( | ||||
|         dryRun: Store<boolean>, | ||||
|  | @ -151,10 +151,10 @@ export class ChangesetHandler { | |||
|                     await this.UpdateTags(csId, extraMetaTags) | ||||
|                 } | ||||
|             } catch (e) { | ||||
|                 if(this._reportError){ | ||||
|                 if (this._reportError) { | ||||
|                     this._reportError(e) | ||||
|                 } | ||||
|                 console.warn("Could not open/upload changeset due to ", e,"trying t") | ||||
|                 console.warn("Could not open/upload changeset due to ", e, "trying t") | ||||
|                 openChangeset.setData(undefined) | ||||
| 
 | ||||
|                 throw e | ||||
|  | @ -186,7 +186,7 @@ export class ChangesetHandler { | |||
|                 ) | ||||
|                 await this.UpdateTags(csId, rewrittenTags) | ||||
|             } catch (e) { | ||||
|                 if(this._reportError){ | ||||
|                 if (this._reportError) { | ||||
|                     this._reportError(e) | ||||
|                 } | ||||
|                 console.warn("Could not upload, changeset is probably closed: ", e) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue