-
-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Description
The example from the MDN site fails to parse in strict mode:
images/team-photo.jpg, images/team-photo-retina.jpg 2x
Parsing it:
parseSrcset("images/team-photo.jpg, images/team-photo-retina.jpg 2x", {strict: true})
Gives an error:
file:///platform/node_modules/srcset/index.js:32
if (allDescriptors.x['1']) {
^
TypeError: Cannot read properties of undefined (reading '1')
at fallbackDescriptorDuplicateCheck (file:///platform/node_modules/srcset/index.js:32:22)
at descriptorCountCheck (file:///platform/node_modules/srcset/index.js:41:3)
at file:///platform/node_modules/srcset/index.js:92:5
at Array.map (<anonymous>)
at parseSrcset (file:///platform/node_modules/srcset/index.js:86:4)
at <anonymous> (/platform/src/docugen/builder/index.ts:19:13)
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:120:12)
Node.js v21.6.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels