diff --git a/website/client/src/app.vue b/website/client/src/app.vue
index b157a0d565..bf0de15bb7 100644
--- a/website/client/src/app.vue
+++ b/website/client/src/app.vue
@@ -358,6 +358,7 @@ export default {
return response;
}, error => { // Set up Error interceptors
+ console.log(error);
if (error.response.status >= 400) {
const isBanned = this.checkForBannedUser(error);
if (isBanned === true) return null; // eslint-disable-line consistent-return
diff --git a/website/client/src/components/appFooter.vue b/website/client/src/components/appFooter.vue
index a3e52140ea..a8783066a1 100644
--- a/website/client/src/components/appFooter.vue
+++ b/website/client/src/components/appFooter.vue
@@ -291,7 +291,7 @@
{
const sinon = await import('sinon');
- const axios = await import('axios');
- const response = await axios.get('/api/v4/debug/time-travel-time');
- const time = new Date(response.data.data.time);
- Vue.config.clock = sinon.useFakeTimers({
- now: time,
- shouldAdvanceTime: true,
- });
+ if (axios.defaults.headers.common['x-api-user']) {
+ const response = await axios.get('/api/v4/debug/time-travel-time');
+ const time = new Date(response.data.data.time);
+ Vue.config.clock = sinon.useFakeTimers({
+ now: time,
+ shouldAdvanceTime: true,
+ });
+ }
})();
}
diff --git a/website/client/vue.config.js b/website/client/vue.config.js
index f6673adbcf..a59d7e2759 100644
--- a/website/client/vue.config.js
+++ b/website/client/vue.config.js
@@ -39,6 +39,8 @@ envVars
envObject[`process.env.${key}`] = `'${nconf.get(key)}'`;
});
+console.log(envObject)
+
const webpackPlugins = [
new webpack.DefinePlugin(envObject),
new webpack.ContextReplacementPlugin(/moment[\\/]locale$/, /^\.\/(NOT_EXISTING)$/),
@@ -56,6 +58,11 @@ module.exports = {
},
],
},
+ resolve: {
+ fallback: {
+ "timers": require.resolve("timers-browserify")
+ },
+ },
plugins: webpackPlugins,
},
chainWebpack: config => {
diff --git a/website/common/script/content/constants/schedule.js b/website/common/script/content/constants/schedule.js
index c0259fb80b..268e530968 100644
--- a/website/common/script/content/constants/schedule.js
+++ b/website/common/script/content/constants/schedule.js
@@ -799,6 +799,7 @@ export function assembleScheduledMatchers (date) {
}
let cachedScheduleMatchers = null;
+let cacheDate = null;
function makeMatcherClass () {
return {
@@ -832,10 +833,10 @@ export function getScheduleMatchingGroup (type, date) {
}
if (!cachedScheduleMatchers) {
cacheDate = new Date();
- const scheduleMatchers = {};
+ cachedScheduleMatchers = {};
assembleScheduledMatchers(checkedDate).forEach(matcher => {
- if (!scheduleMatchers[matcher.type]) {
- scheduleMatchers[matcher.type] = makeMatcherClass();
+ if (!cachedScheduleMatchers[matcher.type]) {
+ cachedScheduleMatchers[matcher.type] = makeMatcherClass();
}
if (matcher.matcher instanceof Function) {
cachedScheduleMatchers[matcher.type].matchers.push(matcher.matcher);
diff --git a/website/common/script/libs/shops.js b/website/common/script/libs/shops.js
index d6339619c2..61fbb4b5c3 100644
--- a/website/common/script/libs/shops.js
+++ b/website/common/script/libs/shops.js
@@ -272,7 +272,7 @@ shops.getQuestShopCategories = function getQuestShopCategories (user, language)
};
bundleCategory.items = sortBy(values(content.bundles)
- .filter(bundle => bundle.type === 'quests' && bundle.canBuy())
+ .filter(bundle => bundle.type === 'quests')
.map(bundle => getItemInfo(user, 'bundles', bundle, officialPinnedItems, language)));
if (bundleCategory.items.length > 0) {