@gmetrixr/rjson
Version:
(R)ecursive Json
18 lines (17 loc) • 579 B
JavaScript
import { r, rtp } from "../../../r";
/**
* Assigns true value to enable_gyro where enable_gyro is undefined.
* Because upto this point, enable_gyro had default of true which is now changed to false.
*/
class Migration {
execute(projectJson) {
const pJson = projectJson;
const projectF = r.project(pJson);
if (projectF.get(rtp.project.enable_gyro) === undefined) {
projectF.set(rtp.project.enable_gyro, true);
}
projectF.set(rtp.project.version, 136);
}
}
const migration = new Migration();
export default migration;