mirror of
https://github.com/maputnik/editor.git
synced 2025-12-06 06:10:00 +00:00
Fix unbound callback in App (#1266)
## Summary - ensure `onSetFileHandle` keeps the right `this` - cover export dialog save with regression test ## Testing - `npm run lint` - `npm run build` - `xvfb-run -a npx cypress run --spec cypress/e2e/modals.cy.ts` *(fails: Failed to execute 'showSaveFilePicker' due to environment issues)* ------ https://chatgpt.com/codex/tasks/task_e_68690228e2cc8331a76abc157e8aadf3
This commit is contained in:
@@ -877,8 +877,8 @@ export default class App extends React.Component<any, AppState> {
|
||||
this.setModal(modalName, !this.state.isOpen[modalName]);
|
||||
}
|
||||
|
||||
onSetFileHandle(fileHandle: FileSystemFileHandle | null) {
|
||||
this.setState({fileHandle: fileHandle});
|
||||
onSetFileHandle = (fileHandle: FileSystemFileHandle | null) => {
|
||||
this.setState({ fileHandle });
|
||||
}
|
||||
|
||||
onChangeOpenlayersDebug = (key: keyof AppState["openlayersDebugOptions"], value: boolean) => {
|
||||
|
||||
Reference in New Issue
Block a user