<commit_before>import Item from './item';
import { TYPE_ITEM, TYPE_ROOM } from '../lib/Constants';

export default class Room extends Item {
	constructor(data) {
		if (!data.type || data.type === TYPE_ITEM) {
			data.type = TYPE_ROOM;
		} else {
			throw new Error('INVALID_TYPE');
		}
		super(data);
	}
}<commit_msg>Fix INVALID_TYPE error in room model<commit_after>import Item from './item';
import { TYPE_ITEM, TYPE_ROOM } from '../lib/Constants';

export default class Room extends Item {
	constructor(data) {
		if (data.type && data.type !== TYPE_ITEM && data.type !== TYPE_ROOM) {
			throw new Error('INVALID_TYPE');
		} else {
			data.type = TYPE_ROOM;
		}

		super(data);
	}
}
{'fraction_non_alphanumeric': 0.15058479532163743, 'fraction_numerical': 0.0, 'mean_word_length': 3.823943661971831, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3904251', 'n_tokens_mistral': 245, 'n_tokens_neox': 226, 'n_words': 61}