Fix(deployment-id): prevent exception on old webkit - #94604
Merged
Conversation
Contributor
Tests PassedCommit: 133aa5b |
Contributor
Stats from current PR🔴 1 regression, 1 improvement
📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
Build Cache
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📎 Tarball URLCommit: 133aa5b |
mischnic
approved these changes
Jun 24, 2026
kyamaz99
force-pushed
the
fix/dataset-delete-old-webkit
branch
from
June 26, 2026 15:46
4d13e3f to
b6d4f93
Compare
kyamaz99
force-pushed
the
fix/dataset-delete-old-webkit
branch
from
August 6, 2026 07:46
b6d4f93 to
133aa5b
Compare
m-kawafuji
pushed a commit
to m-kawafuji/next.js
that referenced
this pull request
Aug 8, 2026
### What? Start a next application after 16.2.0 in a safari 9 which is used in playstation 4. The application will error with this message ```TypeError: Unable to delete property``` ### Why? We narrow down the problem to this line ```delete document.documentElement.dataset.dplId ``` in ```packages/next/src/shared/lib/deployment-id.ts ``` It seems to be related of how webkit implemented dataset, as discussed in this [thread](https://stackoverflow.com/questions/28973603/unable-to-delete-property-on-safari-when-trying-to-delete-dataset-attribute-in) ### How? replace this line ``` delete document.documentElement.dataset.dplId; ``` with ``` document.documentElement.removeAttribute('data-dpl-id');``` if data cannot be deleted , we can remove the attribute. It should achieve the same with a different syntax Fixes vercel#94601
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Start a next application after 16.2.0 in a safari 9 which is used in playstation 4.
The application will error with this message
TypeError: Unable to delete propertyWhy?
We narrow down the problem to this line
delete document.documentElement.dataset.dplIdin
packages/next/src/shared/lib/deployment-id.tsIt seems to be related of how webkit implemented dataset, as discussed in this thread
How?
replace
this line
delete document.documentElement.dataset.dplId;with
document.documentElement.removeAttribute('data-dpl-id');if data cannot be deleted , we can remove the attribute.
It should achieve the same with a different syntax
Fixes #94601