mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
* try to freeze content object * deep freeze the content object, start to implement stable * freeze at the /common level * go back to freezing content only on the client * use deep-frezze-strict to support phantomjs * use own version of deepFreeze * update comment about deepFreeze
14 lines
489 B
JavaScript
14 lines
489 B
JavaScript
import deepFreeze from '../libs/deepFreeze';
|
|
import content from '../../common/script/content/index';
|
|
|
|
const state = {
|
|
title: 'Habitica',
|
|
user: null,
|
|
tasks: null, // user tasks
|
|
// content data, frozen to prevent Vue from modifying it since it's static data that never changes
|
|
// TODO apply freezing to the entire codebase (the server) and not only to the client side?
|
|
// NOTE this takes about 10-15ms on a fast computer
|
|
content: deepFreeze(content),
|
|
};
|
|
|
|
export default state; |