UNPKG

@gmetrixr/rjson

Version:
27 lines (26 loc) 977 B
import { r, rtp } from "../../../r"; /** * Converts projectJson prop chat_scene to a RecordOrderedMap of chat RecordNodes * @deprecated * This is no longer needed as we don't have a chat property anymore */ class Migration { execute(projectJson) { const pJson = projectJson; const projectF = r.record(pJson); const chat_scenes = pJson.props["chat_scenes"]; if (chat_scenes !== undefined) { delete pJson.props["chat_scenes"]; // for(const sceneId of chat_scenes) { // //Need the id to be deterministic for test cases // const chatRecord = R.createRecord(RT.chat, sceneId + 200001); // chatRecord.props.chat_scene_id = sceneId; // chatRecord.props.chat_show = true; // projectF.addRecord(chatRecord); // } } projectF.set(rtp.project.version, 114); } } const migration = new Migration(); export default migration;