Skip to content

Commit

Permalink
revert(lodash): revert switching to native version of defaults
Browse files Browse the repository at this point in the history
Accidental commit
  • Loading branch information
bubonicfred committed Jun 26, 2024
1 parent 96005a9 commit 6348734
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions imports/infoitem.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/**
* A InfoItem is a sub-element of
* a topic which has a subject,
* a topic which has a subject,>
* a date when is was created
* and a list of associated tags.
*/
import { User } from "/imports/user";
import { _ } from "lodash";
import { Meteor } from "meteor/meteor";
import { Random } from "meteor/random";

import { formatDateISO8601 } from "./helpers/date";
import { StringUtils } from "./helpers/string-utils";
import { formatDateISO8601 } from "./helpers/date.js";
import { StringUtils } from "./helpers/string-utils.js";
import { User } from "./user.js";

/**
* The InfoItem class represents an information item in a topic.
Expand Down Expand Up @@ -48,13 +48,12 @@ export class InfoItem {
if (!Object.prototype.hasOwnProperty.call(source, "createdInMinute")) {
throw new Meteor.Error("Property createdInMinute of topicDoc required");
}
const defaultValues = {
_.defaults(source, {
itemType: "infoItem",
isNew: true,
isSticky: false,
labels: [],
};
this._infoItemDoc = Object.assign({}, defaultValues, source);
});
this._infoItemDoc = source;
}

Expand Down

0 comments on commit 6348734

Please sign in to comment.