Backwards compatibility for people who use `Discourse.PageTracker`
Rather than importing it.
This commit is contained in:
parent
015eb47ea0
commit
5c3d14b421
app/assets/javascripts/discourse/lib
|
@ -23,9 +23,12 @@ export function onPageChange(fn) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// backwards compatibility
|
// backwards compatibility
|
||||||
export default {
|
const BackwardsCompat = {
|
||||||
current() {
|
current() {
|
||||||
console.warn(`Using PageTracker.current() is deprecated. Your plugin should use the PluginAPI`);
|
console.warn(`Using PageTracker.current() is deprecated. Your plugin should use the PluginAPI`);
|
||||||
return _pageTracker;
|
return _pageTracker;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Discourse.PageTracker = BackwardsCompat;
|
||||||
|
export default BackwardsCompat;
|
||||||
|
|
Loading…
Reference in New Issue