Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting scheduler.partner to undefined fails #1978

Closed
pmiklashevych opened this issue Nov 26, 2020 · 0 comments
Closed

Setting scheduler.partner to undefined fails #1978

pmiklashevych opened this issue Nov 26, 2020 · 0 comments
Assignees
Labels
bug Something isn't working resolved Fixed but not yet released (available in the nightly builds)
Milestone

Comments

@pmiklashevych
Copy link

pmiklashevych commented Nov 26, 2020

https://www.bryntum.com/forum/viewtopic.php?p=79797#p79797

We should allow nullish value to be considered as partner is not specified

http://lh/bryntum-suite/scheduler/examples/basic/

Scheduler/examples/basic/app.js

const scheduler = new Scheduler({
    partner          : undefined,

Error:

Collection.js:1105 Uncaught TypeError: Cannot read property 'id' of undefined
    at Collection.includes (Collection.js:1105)
    at Scheduler.set partner [as partner] (TimelineBase.js:639)
    at Scheduler.get (Config.js:402)
    at Scheduler.startConfigure (TimelineBase.js:463)
    at Scheduler.startConfigure (ProjectConsumer.js:71)
    at Scheduler.setConfig (Base.js:815)
    at Scheduler.configure (Base.js:744)
    at Scheduler.construct (Base.js:386)
    at Scheduler.construct (Localizable.js:151)
    at Scheduler.construct (Events.js:333)

We default it to undefined in the framework wrappers, for example:
SchedulerPro/examples/frameworks/npm/angular/projects/schedulerpro/src/lib/schedulerpro.component.ts

    // The application may have passed string id of the partner so
    // we attempt to find the real instance of the scheduler with that id
    if (config['partner'] && 'string' === typeof config['partner']) {
      const bryntum = window['bryntum'],
        partner = bryntum && bryntum.get && bryntum.get(config['partner']);
      config['partner'] = partner || undefined;
    }
@pmiklashevych pmiklashevych added the bug Something isn't working label Nov 26, 2020
@isglass isglass added this to the 4.0.x milestone Nov 27, 2020
@SergeyMaltsev SergeyMaltsev modified the milestones: 4.0.x, 4.1.x Feb 18, 2021
@matsbryntse matsbryntse removed this from the 4.1.x milestone Jun 22, 2021
@matsbryntse matsbryntse self-assigned this Oct 15, 2023
@matsbryntse matsbryntse added ready for review Issue is fixed, the pull request is being reviewed resolved Fixed but not yet released (available in the nightly builds) and removed ready for review Issue is fixed, the pull request is being reviewed labels Oct 15, 2023
@matsbryntse matsbryntse added this to the 5.5.5 milestone Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved Fixed but not yet released (available in the nightly builds)
Projects
None yet
Development

No branches or pull requests

4 participants