Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(schema): fix setupTimestamps for browser.umd #12683

Merged

Conversation

raphael-papazikas
Copy link
Contributor

@raphael-papazikas raphael-papazikas commented Nov 11, 2022

With the current browser.umd it‘s no longer possible to create schemas in the browser with timestamps: true. The following error is thrown: Cannot read properties of null (reading 'get')

Example to reproduce:

import mongoose from "mongoose";

const TestSchema = new mongoose.Schema(
  { a: String },
  { timestamps: true }
);

fix(setupTimestampts): add semicolon
Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@vkarpov15 vkarpov15 merged commit 0dc706b into Automattic:master Nov 12, 2022
@vkarpov15 vkarpov15 added this to the 6.7.3 milestone Nov 12, 2022
@raphael-papazikas raphael-papazikas deleted the fix/schema-base-undefined branch November 13, 2022 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants