mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 13:39:36 -06:00
Backwards compatibility for people who use Discourse.PageTracker
Rather than importing it.
This commit is contained in:
parent
015eb47ea0
commit
5c3d14b421
@ -23,9 +23,12 @@ export function onPageChange(fn) {
|
||||
}
|
||||
|
||||
// backwards compatibility
|
||||
export default {
|
||||
const BackwardsCompat = {
|
||||
current() {
|
||||
console.warn(`Using PageTracker.current() is deprecated. Your plugin should use the PluginAPI`);
|
||||
return _pageTracker;
|
||||
}
|
||||
};
|
||||
|
||||
Discourse.PageTracker = BackwardsCompat;
|
||||
export default BackwardsCompat;
|
||||
|
Loading…
Reference in New Issue
Block a user