No difference.
I found another weirdo, here’s bigger snippet:
import PostModel from 'discourse/models/post';
import { withPluginApi } from 'discourse/lib/plugin-api';
import { slot, loadGoogle } from '../lib/gpt';
import TopicView from 'discourse/views/topic';
// here TopicView is defined
export default {
name: 'initialize-ad-plugin',
initialize(container) {
PostModel.reopen({
...
})
...
// but here TopicView is not defined
...
}
}
TopicView is accessible out of anonymous object, but not inside it. But i don’t understand why there’s no problem with PostModel?