mirror of
https://github.com/maputnik/editor.git
synced 2026-05-01 22:00:01 +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]);
|
this.setModal(modalName, !this.state.isOpen[modalName]);
|
||||||
}
|
}
|
||||||
|
|
||||||
onSetFileHandle(fileHandle: FileSystemFileHandle | null) {
|
onSetFileHandle = (fileHandle: FileSystemFileHandle | null) => {
|
||||||
this.setState({fileHandle: fileHandle});
|
this.setState({ fileHandle });
|
||||||
}
|
}
|
||||||
|
|
||||||
onChangeOpenlayersDebug = (key: keyof AppState["openlayersDebugOptions"], value: boolean) => {
|
onChangeOpenlayersDebug = (key: keyof AppState["openlayersDebugOptions"], value: boolean) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user