Skip to content

Commit

Permalink
fix(babel-plugin-export-metadata): avoid adding __filemeta to non-ext…
Browse files Browse the repository at this point in the history
…ensible objects (#798)
  • Loading branch information
jchadwick authored and pedronauck committed Apr 16, 2019
1 parent 041d28f commit 794ebc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion other-packages/babel-plugin-export-metadata/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { default: template } = require('@babel/template')
const { get } = require('lodash')

const buildFileMeta = template(`
if (typeof ID !== 'undefined' && ID && ID === Object(ID)) {
if (typeof ID !== 'undefined' && ID && ID === Object(ID) && Object.isExtensible(ID)) {
Object.defineProperty(ID, '__filemeta', {
enumerable: true,
configurable: true,
Expand Down

0 comments on commit 794ebc4

Please sign in to comment.