What's the correct way to prevent warnings on IntelliJ, for example this code:
the .children_str
gives warning Unresolved variable children_str
. The children_str
property is a string
, and row
is an Object
.
Normally I would add a namespace (I don't know what is it, but it removes those warnings):
But then another warning appeared Unresolved function or method split()
What's the correct way to tell IntelliJ that children_str
is a string to remove those warning message?
The warning can be removed by assigning and adding ||
operator, for example:
row.children_str = row.children_str || '';