Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: config.platform was ignored (#9442)
- Loading branch information
Showing
5 changed files
with
40 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
export {default as BasePlatform} from './platform.base'; | ||
export {default as BasicPlatform} from './platform.basic'; | ||
export {default as DomPlatform} from './platform.dom'; | ||
import {_isDomSupported} from '../helpers'; | ||
import BasePlatform from './platform.base'; | ||
import BasicPlatform from './platform.basic'; | ||
import DomPlatform from './platform.dom'; | ||
|
||
export function _detectPlatform(canvas) { | ||
if (!_isDomSupported() || (typeof OffscreenCanvas !== 'undefined' && canvas instanceof OffscreenCanvas)) { | ||
return BasicPlatform; | ||
} | ||
return DomPlatform; | ||
} | ||
|
||
export {BasePlatform, BasicPlatform, DomPlatform}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters