Skip to content

Commit

Permalink
fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
imolorhe committed Jul 8, 2024
1 parent 493b56f commit 3194283
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/altair-core/src/authorization/providers/api-key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ export default class ApiKeyAuthorizationProvider extends AuthorizationProvider<A
async execute(
options: AuthorizationProviderExecuteOptions<ApiKeyAuthorizationProviderData>
): Promise<AuthorizationResult> {
if (!options.data?.key || !options.data?.value) {
return {
headers: {},
};
}

return {
headers: {
[options.data.key]: this.hydrate(options.data.value),
Expand Down
3 changes: 2 additions & 1 deletion packages/altair-core/src/plugin/v3/panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export abstract class AltairV3Panel {
data.styleUrls.forEach((styleUrl) => {
const link = document.createElement('link');
link.rel = 'stylesheet';

link.type = 'text/css';
link.crossOrigin = 'anonymous';
link.href = styleUrl;
document.head.appendChild(link);
});
Expand Down
3 changes: 3 additions & 0 deletions packages/altair-core/src/plugin/v3/parent-engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ export class PluginParentEngine {
this.worker.respond(PLUGIN_GET_APP_STYLE_URL_EVENT, async () => {
const styleSheets = Array.from(document.styleSheets);
// Get the style sheet URLs

// FYI for some reason I haven't figured out yet, we can't link to the stylesheets
// in the browser extensions directly from the sandboxed iframe.
const styleUrls = styleSheets
.map((sheet) => {
if (sheet?.href) {
Expand Down

0 comments on commit 3194283

Please sign in to comment.