Code Monkey home page Code Monkey logo

peepahk's Issues

Array unset items leads to Error.

Steps to reproduce

p := peep([1,2,3,unset])

Expected behaviour

No Error and p.value to contain

Array[
    1: 1
    2: 2
    3: 3
    4: unset
]

Actual behaviour

An Error was thrown:

Error: This variable has not been assigned a value.

Specifically: local v

	---- C:\Users\lauri\Documents\AutoHotkey\Lib\v2\peep\script\peep.v2.ahk
	231: If this.is_enumerable[_type]
	232: For k, v in item
▶	233: mid .= (Peep.array_values_inline && _type = "array") ? (A_Index > 1 ? ", " : "") this.checker(v, ent+1) : "
" this.ind(ent) k ":" . (Peep.key_val_inline ? " " : "
" this.ind(ent+1)) . this.checker(v, ent+1)
	239: If (Peep.array_values_inline && _type = "array")
	240: Return str mid "]"

Call stack:
C:\Users\lauri\Documents\AutoHotkey\Lib\v2\peep\script\peep.v2.ahk (233) : [Peep.Prototype.extract] mid .= (Peep.array_values_inline && _type = "array") ? (A_Index > 1 ? ", " : "") this.checker(v, ent+1) : "
" this.ind(ent) k ":" . (Peep.key_val_inline ? " " : "
" this.ind(ent+1)) . this.checker(v, ent+1)
C:\Users\lauri\Documents\AutoHotkey\Lib\v2\peep\script\peep.v2.ahk (188) : [Peep.Prototype.checker] Return this.is_prim[gen] ? this.primitive(item, _type) : this.extract(item, _type, gen, ent)
C:\Users\lauri\Documents\AutoHotkey\Lib\v2\peep\script\peep.v2.ahk (174) : [Peep.Prototype.__Call] txt .= (IsSet(v) ? this.checker(v, 1) : "<UNSET>") . spacer
C:\Users\lauri\Documents\AutoHotkey\Lib\v2\peep\script\peep.v2.ahk (165) : [Peep.Prototype.__New] this.inda := ["", Peep.ind_type] ,this.value := "" ,this.__Call(item*)
C:\Users\lauri\Documents\AutoHotkey\tmp\cmdhk-tmp.ahk (51) : [Object.Call] p := peep([1,2,3,unset])
C:\Users\lauri\Documents\AutoHotkey\tmp\cmdhk-tmp.ahk (51) : [] p := peep([1,2,3,unset])
> Auto-execute
 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.