Skip to content

Web crash get_os().platform() == 'win32' #394

@raspberry-jenshen

Description

@raspberry-jenshen

Hello!

Thank you for your cool package!

I faced issues when I converted my Kotlin code to the web platform (JS).

My code:

internal class FileSystemImpl(
    private val fileSystem: KotlinFiles = SystemFileSystem,
) : FileSystem {

The crash:
platform undefined

The crash happens when FileSystemImpl is created.

// JS code
var properties_initialized_FileSystemJs_kt_lg8f5i;
  function _init_properties_FileSystemJs_kt__4boaac() {
    if (!properties_initialized_FileSystemJs_kt_lg8f5i) {
      properties_initialized_FileSystemJs_kt_lg8f5i = true;
      SystemFileSystem = new SystemFileSystem$1();
      // crash is here
      isWindows = get_os().platform() == 'win32';
    }
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions