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

Conversation

rodumani
Copy link
Contributor

@rodumani rodumani commented Mar 28, 2019

Please check if the PR fulfills these requirements

  • It's the right issue type on the title
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • It does not introduce a breaking change or has a description of the breaking change

Description

Although PR #17 has added exts property in Viewer, it is not used anywhere.

Despite of it, examples of viewer storybook are working because its Editor has initialized extensions at editor storybook. Extensions of viewer is not configured by viewer storybook itself. If you try viewer storybook without editor storybook, extensions are not working.

So this PR fix Viewer to use its exts property.

Also, scrollSync extension in viewer storybook is causing error.

Cannot read property 'get' of undefined
TypeError: Cannot read property 'get' of undefined
    at scrollSyncExtension (http://localhost:6006/vendors~main.566b849c84711d1f2149.bundle.js:188532:18)
    at http://localhost:6006/vendors~main.566b849c84711d1f2149.bundle.js:151695:15
    at Array.forEach (<anonymous>)
    at ExtManager.applyExtension (http://localhost:6006/vendors~main.566b849c84711d1f2149.bundle.js:151686:17)
    at new ToastUIEditorViewer (http://localhost:6006/vendors~main.566b849c84711d1f2149.bundle.js:154061:26)
    at Function.factory (http://localhost:6006/vendors~main.566b849c84711d1f2149.bundle.js:159353:21)
    at VueComponent.mounted (http://localhost:6006/main.1574541a3aa60a44d3a5.hot-update.js:64:69)
    at invokeWithErrorHandling (http://localhost:6006/vendors~main.566b849c84711d1f2149.bundle.js:196508:57)
    at callHook (http://localhost:6006/vendors~main.566b849c84711d1f2149.bundle.js:198825:7)
    at Object.insert (http://localhost:6006/vendors~main.566b849c84711d1f2149.bundle.js:197773:7)

Because viewer does not need scrollSync extension, this PR removes it from viewer storybook.

In addition, as minor change, this PR removes unused import from storybooks.

Copy link
Contributor

@sohee-lee7 sohee-lee7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contribution. 👍 👍 👍

@sohee-lee7 sohee-lee7 merged commit 199c252 into nhn:master Mar 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants