We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5445cbb commit 1d5cbf5Copy full SHA for 1d5cbf5
lib/index.js
@@ -93,7 +93,6 @@ import {unified} from 'unified'
93
import {visit} from 'unist-util-visit'
94
import {VFile} from 'vfile'
95
96
-const own = {}.hasOwnProperty
97
const changelog =
98
'https://github.com/remarkjs/react-markdown/blob/main/changelog.md'
99
@@ -251,7 +250,10 @@ export function Markdown(options) {
251
250
let key
252
253
for (key in urlAttributes) {
254
- if (own.call(urlAttributes, key) && own.call(node.properties, key)) {
+ if (
+ Object.hasOwn(urlAttributes, key) &&
255
+ Object.hasOwn(node.properties, key)
256
+ ) {
257
const value = node.properties[key]
258
const test = urlAttributes[key]
259
if (test === null || test.includes(node.tagName)) {
0 commit comments