Skip to content

Commit

Permalink
fix: fix CLI crash + build it on travis
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanHotsiy committed Mar 15, 2018
1 parent e8609d2 commit 7769ba8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
addons:
chrome: stable
cache: yarn
before_script: npm run bundle
before_script: npm run bundle && npm run compile:cli
deploy:
- provider: npm
skip_cleanup: true
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "2.0.0-alpha.13",
"description": "ReDoc",
"main": "bundles/redoc.lib.js",
"bin": "bin/cli",
"bin": "bin/cli.js",
"scripts": {
"start": "webpack-dev-server --hot",
"start:benchmark": "webpack-dev-server --env.prod --env.perf",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function html2Str(html: string): string {

// scrollIntoViewIfNeeded polyfill

if (!(Element as any).prototype.scrollIntoViewIfNeeded) {
if (typeof Element !== 'undefined' && !(Element as any).prototype.scrollIntoViewIfNeeded) {
(Element as any).prototype.scrollIntoViewIfNeeded = function(centerIfNeeded) {
centerIfNeeded = arguments.length === 0 ? true : !!centerIfNeeded;

Expand Down

0 comments on commit 7769ba8

Please sign in to comment.