Skip to content
This repository was archived by the owner on Apr 17, 2022. It is now read-only.
This repository was archived by the owner on Apr 17, 2022. It is now read-only.

JS API .include() returns false or undefined *joy* #3188

Description

@wzdev-ci

keyword_false keyword_include keyword_undefined resolution_fixed type_bug | by aubergine


If the include() works, then include() returns 'undefined'. If it fails, it returns 'false'.

In JS, 'undefined' type coerces to 'false' in an 'if' statement....

Could this:

return QScriptValue();

be changed to this:

return QScriptValue(true);

As that will make it a little easier for scripts to determine the outcome of an include() :)


Issue migrated from trac:3188 at 2022-04-16 08:56:03 -0700

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions