Skip to content

Commit 6f77748

Browse files
committed
Refactor
1 parent 06e7bf5 commit 6f77748

File tree

1 file changed

+2
-4
lines changed
  • lib/live_view_native/swiftui/rules_parser/parser

1 file changed

+2
-4
lines changed

lib/live_view_native/swiftui/rules_parser/parser/error.ex

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ defmodule LiveViewNative.SwiftUI.RulesParser.Parser.Error do
2222
error_message,
2323
opts \\ []
2424
) do
25-
# IO.inspect({args, rest, error_message}, label: "error[0]")
26-
2725
error = %__MODULE__{
2826
incorrect_text: List.first(args, ""),
2927
line: line,
@@ -48,10 +46,10 @@ defmodule LiveViewNative.SwiftUI.RulesParser.Parser.Error do
4846
# Never treat error as warning
4947
Context.put_new_error(context, rest, error)
5048

51-
warning ->
49+
optional_warning_key ->
5250
# The error is an optional warning
5351
# Only log the warning if value in `context[<key>]` is true
54-
if get_in(context, [Access.key(warning)]) == true do
52+
if get_in(context, [Access.key(optional_warning_key)]) == true do
5553
Context.put_new_error(context, rest, %{error | is_warning?: true})
5654
else
5755
context

0 commit comments

Comments
 (0)