{"record":{"id":"795367a60348a031","repo":"discourse/discourse","slug":"formkit-the-data-property-expects-a-pojo","errorCode":null,"errorMessage":"[FormKit]: the @data property expects a POJO.","messagePattern":"\\[FormKit\\]: the @data property expects a POJO\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"frontend/discourse/app/form-kit/lib/fk-form-data.js","lineNumber":51,"sourceCode":"  @tracked patches = [];\n\n  /**\n   * The inverse patches to be applied, useful for rollback.\n   * @type {Array}\n   */\n  @tracked inversePatches = [];\n\n  /**\n   * Creates an instance of Changeset.\n   * @param {any} data - The initial data.\n   */\n  constructor(data) {\n    try {\n      this.data = produce(data, () => {});\n      this.draftData = produce(data, () => {});\n    } catch (e) {\n      if (e.message.includes(\"[Immer]\")) {\n        throw new Error(\"[FormKit]: the @data property expects a POJO.\", {\n          cause: e,\n        });\n      }\n    }\n  }\n\n  /**\n   * Checks if the changeset is valid.\n   * @return {boolean} True if there are no errors.\n   */\n  get isValid() {\n    return Object.keys(this.errors).length === 0;\n  }\n\n  /**\n   * Checks if the changeset is invalid.\n   * @return {boolean} True if there are errors.\n   */","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/discourse/discourse/blob/1b2d7253e854205d2c95c80b2c6a1cdd42e45059/frontend/discourse/app/form-kit/lib/fk-form-data.js#L33-L69","documentation":"Error \"[FormKit]: the @data property expects a POJO.\" thrown in discourse/discourse.","triggerScenarios":"Thrown at frontend/discourse/app/form-kit/lib/fk-form-data.js:51 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1b2d7253e854205d2c95c80b2c6a1cdd42e45059","analyzedAt":"2026-08-26T03:11:08.302Z","schemaVersion":2},"datasetVersion":"2026-08-26T07:17:17.940Z"}