Skip to content

Fix TypeError when creating a new project from Planet interface (#6185)#6188

Open
gourijain029-del wants to merge 2 commits intosugarlabs:masterfrom
gourijain029-del:fix-issue-6185
Open

Fix TypeError when creating a new project from Planet interface (#6185)#6188
gourijain029-del wants to merge 2 commits intosugarlabs:masterfrom
gourijain029-del:fix-issue-6185

Conversation

@gourijain029-del
Copy link

@gourijain029-del gourijain029-del commented Mar 9, 2026

Fixes #6185

Description

This PR fixes a runtime error that appeared when clicking the "New Project" ("+") button in the Planet interface.

The bug occurred because _loadStart() inside js/activity.js was previously refactored and renamed to justLoadStart(), however the corresponding call sequence in js/planetInterface.js hadn't been updated to match the new method name yet.

Expected Behavior

Clicking the "New Project" button inside the Planet interface will now start a blank new project smoothly without throwing a TypeError in the console.

Changes Made

  • Replaced this.activity._loadStart() with this.activity.justLoadStart() inside js/planetInterface.js.
  • Updated Jest unit tests in js/__tests__/planetInterface.test.js so that they mock and verify justLoadStart instead of the deprecated _loadStart function.

PR Category

  • Bug Fix
  • Feature
  • Performance
  • Tests
  • Documentation

Checklist

  • I have read and followed the project's code of conduct.
  • I have tested the change locally.
  • I have verified all existing tests are still passing.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

✅ All Jest tests passed! This PR is ready to merge.

@Ashutoshx7
Copy link
Contributor

@gourijain029-del you forgot to add category checks

@github-actions github-actions bot added the bug fix Fixes a bug or incorrect behavior label Mar 9, 2026
@gourijain029-del
Copy link
Author

@gourijain029-del you forgot to add category checks

added category checks

@Ashutoshx7
Copy link
Contributor

@gourijain029-del hy take a look i drop some comments
remove unrelated changes

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

❌ Some Jest tests failed. Please check the logs and fix the issues before merging.

Failed Tests:

GraphicsBlocks.test.js

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

✅ All Jest tests passed! This PR is ready to merge.

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

Labels

bug fix Fixes a bug or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] TypeError when creating new project from Planet interface

2 participants