Skip to content

Commit 7f99383

Browse files
committed
fix: resource-pop hasMethod could throw error
1 parent 041cd83 commit 7f99383

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/data/src/lib/resource-pop/resource-pop.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class ResourcePopComponent extends PopComponent {
5757

5858
/** Returns true if the given method is part of the methods array (or if there is no methods array) */
5959
public hasMethod(method: string) {
60-
return this.config.methods && this.config.methods.indexOf(method) !== -1;
60+
return this.config && this.config.methods && this.config.methods.indexOf(method) !== -1;
6161
}
6262

6363
/** Determines if the current form can be saved, based on the allowed method (edit/update). */

0 commit comments

Comments
 (0)