We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4afedea commit 868a287Copy full SHA for 868a287
packages/compartment-mapper/src/policy.js
@@ -155,10 +155,13 @@ export const makePackagePolicy = (label, { policy } = {}) => {
155
};
156
} else if (label === ENTRY_COMPARTMENT) {
157
packagePolicy = policy.entry;
158
+ // If policy.entry is `undefined`, we return `undefined` which is
159
+ // equivalent to "allow everything".
160
return packagePolicy;
161
} else if (label) {
162
packagePolicy = policy.resources?.[label];
163
}
164
+ // An empty object for a package policy is equivalent to "allow nothing"
165
return packagePolicy ?? create(null);
166
167
return undefined;
0 commit comments