Skip to content

Bug in node-webkit environment #3

@yuguo

Description

@yuguo

I'm running node-bin-packing in node-webkit environment, and it crashes.

after some research, i found that in this file:

https://github.com/jsmarkus/node-bin-packing/blob/master/js/packer.growing.js

(typeof window !== 'undefined' ? window : module.exports);

is not correct. it assume if an environment don't have window variable, it's node, but node-webkit have window and module and exports variable as global variables, and i do want to assign the anonymous function to module.exports.

so i recommend changing the judge condition, thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions