Skip to content

Commit

Permalink
Merge pull request #12522 from sibiraj-s/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Jan 29, 2021
2 parents 89fcc43 + 3cfa7cf commit 8aff4f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/ProgressPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,13 @@ class ProgressPlugin {
/**
* @param {ProgressPluginArgument} options options
*/
constructor(options) {
constructor(options = {}) {
if (typeof options === "function") {
options = {
handler: options
};
}

options = options || {};
validate(schema, options, {
name: "Progress Plugin",
baseDataPath: "options"
Expand Down
2 changes: 1 addition & 1 deletion types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7463,7 +7463,7 @@ declare interface ProfilingPluginOptions {
outputPath?: string;
}
declare class ProgressPlugin {
constructor(options: ProgressPluginArgument);
constructor(options?: ProgressPluginArgument);
profile?: null | boolean;
handler?: (percentage: number, msg: string, ...args: string[]) => void;
modulesCount?: number;
Expand Down

0 comments on commit 8aff4f8

Please sign in to comment.