Skip to content

Commit e30f0c4

Browse files
committed
Fixed editor have no idea when there's no tab opened
1 parent c042583 commit e30f0c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/editor.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ class _EditorPageState extends State<EditorPage> {
327327
var tabController = TabbedViewController(
328328
tabs,
329329
);
330-
tabController.selectedIndex = selectedTab;
330+
tabController.selectedIndex = tabs.isNotEmpty? selectedTab : null;
331331
final page = Stack(children: [
332332
Column(//direction: Axis.vertical,
333333
children: [

0 commit comments

Comments
 (0)