Skip to content

Commit 02fd631

Browse files
committed
empty indented code in json copy
1 parent 9c993ce commit 02fd631

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

rubberduckvba.client/src/app/routes/indenter/indenter.component.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component, OnInit } from "@angular/core";
22
import { FaIconLibrary } from "@fortawesome/angular-fontawesome";
33
import { fas } from "@fortawesome/free-solid-svg-icons";
4-
import { IndenterViewModel } from "../../model/indenter.model";
4+
import { IndenterViewModel, IndenterViewModelClass } from "../../model/indenter.model";
55
import { ApiClientService } from "../../services/api-client.service";
66

77
@Component({
@@ -29,7 +29,7 @@ export class IndenterComponent implements OnInit {
2929
public isAlignmentOptionsExpanded: boolean = false;
3030
public isCommentOptionsExpanded: boolean = false;
3131
public isVerticalOptionsExpanded: boolean = false;
32-
public isApiAboutBoxExpanded: boolean = true;
32+
public isApiAboutBoxExpanded: boolean = false;
3333

3434
public isIndenterBusy: boolean = false;
3535

@@ -38,7 +38,9 @@ export class IndenterComponent implements OnInit {
3838
}
3939

4040
public get asJson(): string {
41-
return JSON.stringify(this._model);
41+
const copy = new IndenterViewModelClass(this._model);
42+
copy.indentedCode = '';
43+
return JSON.stringify(copy);
4244
}
4345

4446
public indent(): void {

0 commit comments

Comments
 (0)