mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
updated to code to pass test
This commit is contained in:
@@ -483,7 +483,10 @@ export default class MarkdownPreview extends React.Component {
|
||||
eventEmitter.on('export:save-md', this.saveAsMdHandler)
|
||||
eventEmitter.on('export:save-html', this.saveAsHtmlHandler)
|
||||
eventEmitter.on('print', this.printHandler)
|
||||
eventEmitter.on('config-renew', this.rewriteIframe.bind(this))
|
||||
eventEmitter.on('config-renew', () => {
|
||||
this.markdown.updateConfig()
|
||||
this.rewriteIframe()
|
||||
})
|
||||
}
|
||||
|
||||
componentWillUnmount () {
|
||||
|
||||
@@ -265,9 +265,9 @@ class Markdown {
|
||||
}
|
||||
// FIXME We should not depend on global variable.
|
||||
window.md = this.md
|
||||
ee.on('config-renew', () => {
|
||||
this.updateConfig = () => {
|
||||
config = ConfigManager.get()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
render (content) {
|
||||
|
||||
Reference in New Issue
Block a user