C2DH / journal-of-digital-history

frontend app for our Digital Journal
GNU General Public License v3.0
19 stars 4 forks source link

TypeError: Cannot read properties of undefined (reading 'layer') #438

Open eliselavy opened 2 years ago

eliselavy commented 2 years ago

Error:

react-dom.production.min.js:216 TypeError: Cannot read properties of undefined (reading 'layer')
    at ArticleLayer.js:293:48
    at Array.map (<anonymous>)
    at J (ArticleLayer.js:291:25)
    at oa (react-dom.production.min.js:157:137)
    at Ks (react-dom.production.min.js:267:460)
    at ju (react-dom.production.min.js:250:347)
    at _u (react-dom.production.min.js:250:278)
    at Su (react-dom.production.min.js:250:138)
    at mu (react-dom.production.min.js:243:163)
    at react-dom.production.min.js:123:115
 {paragraphsGroups.map((paragraphsIndices, i) => {
        const firstCellInGroup = paragraphs[paragraphsIndices[0]]
        const isPlaceholder = firstCellInGroup.layer !== layer
        if (isPlaceholder) {
          return (

Notebook

https://github.com/jdh-observer/jdh001-MyifnvNPDgUx/commit/91cda55c34d4d45edcbb744fe8c3bfe155abb1f7

eliselavy commented 2 years ago

SOLVED by removing cell


  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "tags": [
     "hidden"
    ]
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "               _                           \n",
       "platform       x86_64-pc-linux-gnu         \n",
       "arch           x86_64                      \n",
       "os             linux-gnu                   \n",
       "system         x86_64, linux-gnu           \n",
       "status                                     \n",
       "major          3                           \n",
       "minor          6.3                         \n",
       "year           2020                        \n",
       "month          02                          \n",
       "day            29                          \n",
       "svn rev        77875                       \n",
       "language       R                           \n",
       "version.string R version 3.6.3 (2020-02-29)\n",
       "nickname       Holding the Windsock        "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "R.version"
   ]
  },
eliselavy commented 2 years ago

if text before ok

Screenshot 2022-05-10 at 13 21 04