Skip to content

Instantly share code, notes, and snippets.

@jdeniau
Created November 28, 2020 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdeniau/c0b8e7b9b5c5b93416f700eca4e690d1 to your computer and use it in GitHub Desktop.
Save jdeniau/c0b8e7b9b5c5b93416f700eca4e690d1 to your computer and use it in GitHub Desktop.
function makeRecord(likeRecord, values, ownerID) {
const record = Object.create(Object.getPrototypeOf(likeRecord));
+
+ const properties = Object.getOwnPropertyDescriptors(likeRecord);
+ Object.defineProperties(record, properties);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment