Skip to content

Commit

Permalink
Merge pull request #201 from bebraw/fix-deno-check
Browse files Browse the repository at this point in the history
fix: Fix check against Deno
  • Loading branch information
Pedro Duarte authored Sep 9, 2020
2 parents 7da2745 + f0172b9 commit ca1a11c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,19 @@ const composeIntoMap = (map: Map<string, IAtom>, atoms: (IAtom | IComposedAtom)[
}
};

declare global {
interface Window {
Deno: any;
}
}

export const createTokens = <T extends ITokensDefinition>(tokens: T) => {
return tokens;
};
export const createCss = <T extends TConfig>(
_config: T,
env: Window | null = typeof window === 'undefined' ? null : window
// Check against Deno env explicitly #199
env: Window | null = typeof window === 'undefined' || window?.Deno ? null : window
): TCss<T> => {
// pre-checked config to avoid checking these all the time
// tslint:disable-next-line
Expand Down

0 comments on commit ca1a11c

Please sign in to comment.